i am looking for a method by which i can export fc list and fc count into xls or csv. for example i have 3 featureclass in Scratch.gdb.
1.PaLakh
2.PATest1
3.Point
i want all 3 of these featureclass name to be exported into a csv or xls. also the feature count of every featureclass against featureclass name.
i tried the below mentioned code, but instead of exporting fclist it exports every character of fc into a new row like.
p
o
i
n
t
import csv, arcpy, os from arcpy import env env.workspace = r"C:\Akhil_Office_1\Python\ToolBox\Scratch\Scratch.gdb" fclist = arcpy.ListFeatureClasses() for fc in fclist: csv_out = open(r'C:\Akhil_Office_1\Python\ToolBox\Scratch\test.csv', 'wb') mywriter = csv.writer(csv_out) rows = zip(arcpy.env.workspace, fc) mywriter.writerows(rows) csv_out.close()
أكثر...
1.PaLakh
2.PATest1
3.Point
i want all 3 of these featureclass name to be exported into a csv or xls. also the feature count of every featureclass against featureclass name.
i tried the below mentioned code, but instead of exporting fclist it exports every character of fc into a new row like.
p
o
i
n
t
import csv, arcpy, os from arcpy import env env.workspace = r"C:\Akhil_Office_1\Python\ToolBox\Scratch\Scratch.gdb" fclist = arcpy.ListFeatureClasses() for fc in fclist: csv_out = open(r'C:\Akhil_Office_1\Python\ToolBox\Scratch\test.csv', 'wb') mywriter = csv.writer(csv_out) rows = zip(arcpy.env.workspace, fc) mywriter.writerows(rows) csv_out.close()
أكثر...