This is for ArcGIS 10.8.1 and Python 2.7
Using Blake Terhune’s solution [thank you, Blake] shown in the ESRI Community article Export Attribute Table to .csv as a basis to create a .csv file from the selected contents of an attribute table, I need to go one step further and modify that script so that it will cycle through a defined number of Attribute Tables within a defined .gdb. [Leaving the changes out, the script works fine for a single FC.]
To do that I made these changes, which, it appears, to have been wrong. Here’s the modified script with the modifications highlighted in yellow:
Modified CSV Script
1. I added line 12 which is intended to create a variable that extracts all FC’s that end with “03”.
2. Then modified line 15 so that that variable defined the array of input tables.
3. Finally added a for-loop as line 20 to cycle through those tables defined by line 15, outputting a – hopefully – concatenated .csv file containing all of the Attribute Table entries.
This didn’t work as shown by this run-time result:
ArcPy Error
I checked to see if all the Fields defined in line 25 were spelled correctly – as I gotten a similar error when there was a problem with the field list – but they were all spelled and capitalized correctly. I would be grateful for some guidance on where I have gone wrong, please.
Thanks so much,