Select to view content in your preferred language

How to delete spaces in Header of .csv?

537
1
05-30-2011 10:13 PM
CelinaThom
Emerging Contributor
I am using model builder and want to import and join two tables.  The tables have spaces in the header (i.e. " Drawing Name") that muck up arcmap.  Is there any way in modelbuilder to correct the header before I attempt to import the table?  I'm a very basic user of python and I'm sure there is a scripting way to do it, but would prefer if at all possible to stick with modelbuilder.  Thanks!

**sorry I didn't realize I had posted this in the wrong forum, I have reposted in Geoprocessing and would delete this post if I knew how!**
0 Kudos
1 Reply
AaronTirrell
New Contributor
I know this is a little old, but I figured it would be worth answering this for future users with the same question.

Try using the 'calculate field' tool and use the 'Trim' function:

Trim([FIELD NAME])

This will trim spaces from the beginning and end of the text.

For other useful field calculator operations check out: Field Calculator Unleashed
0 Kudos