You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcCatalog Data Creation & Import/Export forum

Importing .csv table and assigning field da...   bethany long May 23, 2002
Re: Importing .csv table and assigning fiel...   Neil Clemmons May 23, 2002
Re: Importing .csv table and assigning fiel...   Mark Hoyland May 23, 2002
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Importing .csv table and assigning field data type 
Author bethany long 
Date May 23, 2002 
Message As a novice user, maybe I am missing one big step here, but this is the problem. I have a comma delinated text file that I am opening up in ArcCatalog (or ArcMap for that matter) so that I can join it to an existing shape attribute table. The problem is that the field that I need to have relate is a series of 10 digit numbers with leading zeros, but must be recognized as a text field, rather than number field. I tried fooling the system by putting a dummy line in first with text, but it still looks at the field as a numeric format field and strips out the leading zeros and makes it so I cannot use that field to join the table attributes. When I open up the properties for the table, I cannot edit the data type field to change it to a text field (but it has already stripped off the important leading zeros also).
Any thoughts or ideas would be greatly appreciated. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Importing .csv table and assigning field data type 
Author Neil Clemmons 
Date May 23, 2002 
Message A csv file is just a text file. There is no way to assign a field type. If you want the items in the comma-delimited list to be read as text no matter if they are numeric or not, enclose the values in quotes.

Example:

ID,OwnerName,HouseNumber,Street
"0001","John Doe",319,"Main Street" 
  Neil Clemmons
Senior GIS Developer
Geographic Information Services, Inc.
Birmingham, AL
http://www.gis-services.com

Check out our blog:
http://blog.gis-services.com/ 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Importing .csv table and assigning field data type 
Author Mark Hoyland 
Date May 23, 2002 
Message Bethany

There is a way which you can assign the data type to a field for use with ArcGis.

In the folder where the .csv file resides will be a file called schema.ini

Within this file you can set the values for each field.

eg
[YourFile.csv]
Format=CSVDelimited
Col1=Attribute1 Text Width 10
Col2=Attribute2 Double
Col3=Attribute3 Text Width 32

Col1 refers to field 1
Attribute1 will display as the name of the field
Text Width 10 will create a string field 10 characters wide.

ArcMap and ArcCatalog read this file.

for more info on schema.ini refer to

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcjetschema_ini_file.asp



 
  Mark Hoyland
Sutherland Shire Council