Is there any tool in Arcmap that is helpful to convert table -> csv or text file..??
Solved! Go to Solution.
The following Python script will dump the table in the feature layer 'fc' to the csv file 'outCSV':
>>> import csv ... fc = "points" ... outCSV = r'C:/junk/myNewCSV.csv' ... with open(outCSV, 'w') as csvfile: ... csvwriter = csv.writer(csvfile, delimiter=',') ... with arcpy.da.SearchCursor(fc,"*") as cursor: ... for row in cursor: ... csvwriter.writerow(row)
Yes...just open the attribute table and click on the Table Options menu.....Export... then chose Text File as the file type when you click the folder icon (2nd screen shot)
Thanks for help TIM.. but i would like to know if there is any tool for this in arcmap..??
Here is the help for exporting tables. Hint: change the "Save as type" to 'Text File'.
Thanks for the help Darren but would like to know if there is any tool in arcmap which will help in this issue..??
You could try this tool set, or write your own in Python using the csv library.
Hey Darren, I'm really thankful for the support you have given me but Im currently using 10.3 and when i use Conversion tool -> to excel i get option of .xls file.. can i either get the tool or scrpit for csv..??
The following Python script will dump the table in the feature layer 'fc' to the csv file 'outCSV':
>>> import csv ... fc = "points" ... outCSV = r'C:/junk/myNewCSV.csv' ... with open(outCSV, 'w') as csvfile: ... csvwriter = csv.writer(csvfile, delimiter=',') ... with arcpy.da.SearchCursor(fc,"*") as cursor: ... for row in cursor: ... csvwriter.writerow(row)