English

Problem: Exporting an attribute table as a text file changes the format of values in numeric fields

Description

When exporting an attribute table of a feature class or a shapefile to a CSV file, extra comma separators are added in the CSV file for the values in numeric fields.

In other instances, one of the fields is not exported in the same format as it exists in the attribute table. For example, the attribute table displays long integers with no commas before it is exported. However, commas are displayed with double quotes after the attribute table is exported.

Note:
The defect, NIM102098, states that this problem is fixed in ArcGIS for Desktop 10.3. This article pertains to previous releases (ArcGIS 10.2.x).

Cause

This is a known issue.

If there is a schema.ini (text file driver) in the output file location with information about the table to be written, users can control which thousands separator and decimal separator are used. However, it is impossible to not use a thousands separator. The double quotes are added because the separator is a comma, so the quotes are required to prevent the comma from being a delimiter.

In locales that use a period as the thousands separator, ArcGIS infers that the comma is being used as the separator in this file. The decimal separator is set to a period as its default.

Solution or Workaround

Select any of the provided workarounds below.

Option 1

1. Add new text fields in the attribute table, with a length of 20.
2. Calculate the numeric values to the new fields as text values using the Field Calculator.
3. Export the attribute table to a text file. The text fields display with the correct values, without commas and not quoted.

Option 2 (For Windows only)

In the Customize Format dialog, change the digit grouping to a number with no thousands separator. Refer to the following Windows help page, Change the display of dates, times, currency, and measurements, for more details.
[O-Image]


Note:
This workaround causes the thousands separator to not show up in the legend.

Related Information