How do I export an attribute table to dbf or txt format by use of Python in ArcGIS 10?
|
|
Or, using ArcPy and the arcpy.ExportXYv_stats tool, just specify exporting to a csv. The super-easy way to do it is to use ModelBuilder to build a tool with the 'Spatial Statistics' -> 'Utilities' -> 'Export Feature Attribute to ASCII' utility, specify exactly how you want it to be exported (.csv, tab delimited, whatever), and then export the model builder script to python. Then you can run that script in a loop for all your files. |
|||
|
|
I suggest reviewing ArcGIS Online help. |
|||
|
|
|
I'm not familiar with ArcPy yet, but I have done many conversions like this using arcgisscripting. With arcgisscripting, you could use a SearchCursor to read the table and Python has a great csv module for reading and writing to csv files. All you need to do is load each row of the SearchCursor into a python list object and the csv writer object will write the list to the output file using the writer.writerow(list) method. |
|||
|
|