11

I have found that most if not all geoprocessing tools that allow tabular output are limited to geodatabase tables and DBF files for supported output formats. Are there any that also support CSV output? Numerous tools supports CSV input, such as Table to Table, Copy Rows, etc.

The only exception I have seen is a script tool in the Spatial Statistics toolbox called Export Feature Attribute to ASCII, but this only supports feature classes, not tables, and it chokes on non-ASCII characters:

<type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xa0' in position 213: ordinal not in range(128)`

Edit: Thanks for the alternatives in the answers so far. I actually do use some of those those already myself, but just to be clear my question is specifically about the built-in geoprocessing tools in ArcGIS 10. Alternatives are welcome but I am more specifically wondering why the capability to export to CSV exists interactively in ArcMap but apparently not through the GP framework (without Python scripting).

Incidentally, I trawled around the ArcGIS Ideas site a bit and did come upon a few existing ideas that may be of interest to some:

4 Answers 4

8

I am using the Table To Excel Tool by Ghislain Prince for export data to csv/excel. This tool is mentioned at the end of discussion "Export a table directly to an MS Excel file" at Arcgis ideas in your given link.

I have exported lot of unicode data with this tool and working perfectly.

4
  • Thanks, I think I have used this in the past actually. Not built-in but probably about as good as it's gonna get until ESRI decides to implement text/CSV output on one of their tools (Table to Table would be good).
    – blah238
    Commented May 29, 2012 at 20:59
  • This is exactly my thinking and till now this work around is working fine.
    – iRfAn
    Commented May 30, 2012 at 7:29
  • @blah238 yes this was done as you thought (TableToTable, CopyRows at the 10.3.1 release) .
    – gotchula
    Commented Nov 16, 2015 at 21:21
  • @gotchula thanks for the info. Could you add an answer that describes this? I hadn't heard of that being changed.
    – blah238
    Commented Nov 16, 2015 at 21:36
4

Well FME will do it as a conversion (i.e. FME is an ETL tool and not a GIS with an export function). With its CSV writer you could convert the contents of an existing database, or the attribute content of any spatial format, to a text file delimited with any character.

e.g. here converting the attributes from a Geodatabase to CSV.

enter image description here

Personally I like this method because I have more control over the translation (and transformation) of the data; whereas I would expect most export functions to output the data in a way that would need further processing.

However - NB - I do work for Safe Software, makers of FME, so mine isn't a totally unbiased view!

3
  • Mark, if you changed your nickname to Mark of FME or similar then you wouldn't need to add a disclaimer to qualify your viewpoint as that would be apparent. Just a thought. ;-) Commented May 25, 2012 at 22:03
  • They do use mark2atsafe, donatsafe, etc. on Twitter :)
    – blah238
    Commented May 25, 2012 at 22:12
  • I could, but I prefer to think of this account as being mine, not a work one. I have at least 3 twitter accounts because of that issue! At the same time I don't want to breach any community rules on self-promotion. So I figure this is a good balance, even if I am repeating that disclaimer quite a lot. Are there any other software company employees on here? I don't see many. Commented May 30, 2012 at 17:51
4

Oddly enough, you are better off in the FOSS world than proprietary software. I don't know why. Anyway, some geospatial tools that support export to CSV include OGR2OGR, PostGIS, Spatialite, QGIS etc.

Of course, it is simple enough to write your own exporter using Python (or ArcPy in your case) so maybe ESRI haven't felt the need to give full support.

...and finally, if you can't program but are desparate, you can very easily export point data to a csv via a dbf. simply create two columns for your coordinates in the attribute table, open the DBF in Excel and save as CSV.

1
  • 2
    Actually depending on your data it can be a little tricky to export to CSV with Python, if you need to export unicode data for example you'll have to use a custom CSV writer (an example one is given in the csv module documentation but there are problems with it according to this SO question).
    – blah238
    Commented May 25, 2012 at 21:53
3

Following Mark's lead, there are a couple of options:

Oldie but a goodie, but without Unicode support: http://www.arcgis.com/home/item.html?id=f3d91b8f852042e289e09a7ec8342431

My idea which does support Unicode and a schema.ini file, but requires ArcGIS Pro: http://www.arcgis.com/home/item.html?id=d887241f6908466a984c94631fd1974f

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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