Problem: Float values from text files are truncated to whole numbers in ArcMap
When viewing an ASCII CSV, TXT, or TAB file in an application other than ArcGIS, the file displays values such as:
When opened in ArcGIS, the values displayed in these items are truncated to:
Tools that access ASCII files in ArcGIS, such as the 'Add XY Data' command, use a Microsoft driver to read text files. By default, this driver only scans the first 75 records of the text file to determine the data type of each field. If the first 75 records are all integers, then the entire field will be assumed to be integer, even though subsequent records may be float or double.
Solution or Workaround
Modify the schema.ini file, which gets created in the same directory as the text file and defines how the Microsoft driver interprets the text file.
Instructions for modifying this file are available in the ArcGIS Online Help under Contents tab > ArcCatalog > Exploring the values in a table > About tabular data sources > Accessing delimited text file data. A link is provided to a Microsoft Web site where a search can be done on 'schema.ini' to access more detailed information.
- The following example of schema.ini shows how to force the Microsoft text file driver to read the first 500 lines of a text file called MYDATA.TXT.