Problem: Exporting an attribute table as a text file changes the format of values in numeric fields
【相关信息】
Article ID: 43620
Bug Id: N/A
Software:
ArcGIS for Desktop Advanced 10.2, 10.2.1, 10.2.2
ArcGIS for Desktop Standard 10.2, 10.2.1, 10.2.2
Platforms: N/A
【问题描述】
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.
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).
【原因】
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.
Article ID: 43620
Bug Id: N/A
Software:
ArcGIS for Desktop Advanced 10.2, 10.2.1, 10.2.2
ArcGIS for Desktop Standard 10.2, 10.2.1, 10.2.2
Platforms: N/A
【问题描述】
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.
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).
【原因】
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.
1 个回复
易智瑞技术支持
赞同来自:
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.
【其它相关参考】
【创建及修改时间】
Created: 12/9/2014
Last Modified: 2/11/2015
【原文链接】
http://support.esri.com/en/kno ... 43620
要回复问题请先登录或注册