Wednesday, 8 June 2016

excel - Data-type detection in ArcGIS table loading


When adding tables layers from Excel files, ArcGIS attempts to guess the data-types:



Microsoft Excel does not enforce field types for values during data entry like standard databases do. Therefore, the field type specified in Excel is not used in determining the field type exposed in ArcGIS. Instead, field type in ArcGIS is determined by a scan of the values in the first eight rows for that field. If the scan finds mixed data types in a single field, that field will be returned as a string field and the values will be converted to strings.




Does anyone know what heuristic rules are used here?



Answer



I'm not sure that this helps with your specific question, and you may well have already seen it, but see these links from Esri ArcGIS blog and help docs, both titled "Formatting an Excel table for use in ArcGIS":



highlights:


Excel workbook and worksheet names should not contain spaces.

Field names must:
- start with a letter.
- contain only letters, numbers, and underscores.

- not exceed 64 characters.

ArcMap scans first eight rows to determine field type.
If mixed types encountered field is converted to text.

Numeric fields are converted to the double data type.
ArcMap can only read the first 255 characters of a cell.

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...