2

I am getting false parsing and un-necessary quotes for 3 numeric fields when exporting table to ascii (CSV). Items are all DOUBLE. "675,654","5,567,000" is the resulting export format which should be .....,675654",5567000,..... I have checked all ITEM property settings at table level but not yet in catalogue. Will do that next. This is with Arc GIS 10.1, Windows 7 Enterprise P1. Everything points to the fields being well defined as numeric Double INT, no decimals. Anyone have problems with the ASCII table exporter doing bad parsing of numerics?

  • Please provide more info on the environment you're working in. – Eok May 11 '15 at 18:13
  • Windows 7 enterprise 64 bit, ArcMap 10.2.1 for desktop – Eric - NRCAN May 11 '15 at 18:16
  • What format is the source table, not something in Excel is it? – Hornbydd May 11 '15 at 19:12
  • You've got some conflicts in your question. You say they're all doubles but then you say 'defined as numeric Double INT, no decimals' - so which datatype are the fields, double or integer? Your comment says 10.2, but your question edit says 10.1. Is there formatting applied to the fields? Unless you have it set to display separator commas I wouldn't expect them in the output. You also have a quote mark in your output example, which I wouldn't expect if exporting numeric. – Chris W May 11 '15 at 19:16
2

This process maybe lengthy, but it's worth it. Click on "file" on the attribute table. Go to Export, and click on the "Output", click on "Save as type" and select dbase table. After this process, simply go to conversion tool in ArcToolbox. Select "To Excel from Table". You can then change the data to CSV from there.

In Excel, Click on "File", select "Save as", and choose CSV.

1

Use QGIS DESKTOP. connect to you data Right click save as CSV is option As well as all the other OGR formats Or skip the desktop and do it via ogr2ogr Ogr2ogr -f CSV path/filename.csv sourcefilepath/name or connection string

0

Work around to this is to use the Conversion Tools>Excell>Table To Excel. This parses properly. Could be that there is a bug in ArcMap 10.2.1 Dor Desktop, for Attribute table export to csv with long value content such as commonly seen in UTM coordinates, 6 and 7 significant digits. These may get parsed with double quotes and internal thousands seperators such that a numeric field like 658000 gets exported via CSV to look like ..."658,000"... and 5567800 will look like ..."5,567,800"..... this was with version 10.2.1.3497

The data type was indeed DOUBLE and output was double quotes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.