Easily Export ArcGIS Attribute Table to CSV

 

For many ArcGIS users, exporting an attribute table to a .csv file or excel format file is a common part of their workflow. Unfortunately, exporting to either of these formats directly from the attribute table has never been a core functionality of ArcGIS. To overcome this you typically have had two choices: write a script using third-party libraries or use an ArcToolbox tool such as the Export Feature Attributes to ASCII Tool or the Table to Excel conversion tool. But with each of these, you have to open special tools or go through multiple steps to convert.

However, there is a little shortcut you can take to quickly export your data to .csv right from the attribute table.

  • From the table, click Export.
  • Under “Output Table” browse to the folder you want to put your .csv file in, save type as .txt and enter a name for your output making sure to leave off the ‘.txt’ from the end of the name.

If the ‘.txt’ extension is present in the name the tool will output a normal text file of your data. If, however, your name does not include the ‘.txt’ extension or if you specify .csv, then your output will be a .csv file by default.

 

Can I export directly to a .xlsx format?

There’s another handy little trick for quickly getting ArcGIS attribute table data into any Microsoft Excel data format.

    1. With your attribute table still open, click on the Table Options drop-down in the upper left corner of the table and click “Select All”.
    2. Alternatively, you can select only the rows you want to export by holding your Ctrl button while clicking the leftmost, gray box by each desired row. You can also use the Select By Attributes button at the top of the table or select features (and their corresponding table records) from the map itself. The point is, select some records to export.
    3. Now right click on any of the leftmost, gray box of any record in the table and choose “Copy Selected”.
    4. With an Excel spreadsheet already open, right-click in the uppermost left cell and click “paste”. All of your records will be pasted to the worksheet.
    5. Save your worksheet as a .xlsx file (or any file extension that Excel provides for saving) and you’re done.

It takes longer to explain the above method than it does to put it into practice. After you do it once or twice it will be very quick.

 

Related Post

9
Leave a Reply

avatar
7 Comment threads
2 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
7 Comment authors
Gary S.FatimaBrandonRyanDSF Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Anonymous
Guest
Anonymous

That’s just perfect. Thanks for sharing 🙂

matej
Guest
matej

fantastic, thanks man!

DSF
Guest
DSF

Is there anyway to batch export to CSV?

Brandon
Guest
Brandon

Any ideas on scripting this Python or implementing it in model builder? Unfortunately the right click > data > export functionality does not seem to be accessible from a tool or in the arcpy module.

One other note, there is a tool to export a table to a .csv file in the Highways extension (if you have the license):

http://resources.arcgis.com/en/help/main/10.2/index.html#//02240000000s000000

Why ESRI would bury this tool behind the highways extension?? Doesn’t seem to really have functionality exclusive to ‘maintaining highway data with linear referencing systems’

Brandon
Guest
Brandon
Fatima
Guest
Fatima

Thank you! The report function in ArcGIS is much more awkward than using a .csv

Gary S.
Guest
Gary S.

Thanks for the great tip! You win the Internet!