How to change field type in Excel before importing?

10902
13
10-27-2016 12:21 PM
EllieHakari
New Contributor II

Hello everyone!

I'm currently trying to calibrate stationing along a highway, but I need the stationing to be straight numbers ("54000" instead of the typical "540+00"). I have an Excel document that the correct formatting is in, and I thought I'd join it with our current stationing shapefile, but when I import it into ArcMAP, the field is automatically changed to a string. I need it to be a number field. That's the only way the calibrate tool will work. Any suggestions would be greatly appreciated!

Things I've tried:

Changing field type from ArcCatalog (which I found you can't change from text to number)

Setting the type in Excel to number

EDIT: I fixed it myself. Apparently if you save your Excel document as a .csv first, then import it, ArcMAP will automatically make the field numeric.

13 Replies
DanPatterson_Retired
MVP Emeritus

Excel used to have the ability to click on the field name and set its properties to prevent wrong data types... or am I thinking of Quattro Pro?

0 Kudos
EllieHakari
New Contributor II

You can set the type (if I understand what you're referencing -- see below) but it doesn't actually change the field type in ArcMAP. 

0 Kudos
DarrenWiens2
MVP Honored Contributor

You can set the type but ArcGIS also checks to make sure it makes sense. For example, you can set a column of numbers in Excel to text and it will import as text, but if you set a column of text to number in Excel, it will import as text into ArcGIS because you can't have non-numerical characters in a numerical field within ArcGIS.

curtvprice
MVP Esteemed Contributor

You can modify a schema.ini file to tweak file types (but of course in this case the + would not support importing as a number as it was rightly pointed out above).

Adding an ASCII or text file table—Help | ArcGIS for Desktop 

0 Kudos