I have a feature class whose fields are copied to a python list. Each sub-list contains a field of attribute table. I want to copy this list to an excel sheet. I am using xlwt package. The problem is the second field has geometry dataype. So it is giving an exception: Unexpected data type
below is the code i am using:
import xlwtbook= xlwt.Workbook() sheet = book.add_sheet("Cable_info") for i in range(0,len(l)): for j in range(len(l[0])): sheet.write(j,i, l[j])book.save("cables.xls")Since the second field is geometry type if i start the outer loop with range(2, len(l)) it works fine.
So basically the quesiton is. Is it possible to copy an attribute table with a geometry field to an excel sheet this way
أكثر...
below is the code i am using:
import xlwtbook= xlwt.Workbook() sheet = book.add_sheet("Cable_info") for i in range(0,len(l)): for j in range(len(l[0])): sheet.write(j,i, l[j])book.save("cables.xls")Since the second field is geometry type if i start the outer loop with range(2, len(l)) it works fine.
So basically the quesiton is. Is it possible to copy an attribute table with a geometry field to an excel sheet this way
أكثر...