# Use row object to get and set field values cur = arcpy.SearchCursor(data_source) # Set up workbook and sheet book = Workbook() sheet1 = book.add_sheet('Points') # Set counter rowx = 0 # Loop through rows in dbf file. arcpy.AddMessage(cur) for row in cur: rowx += 1 # Write each row to the sheet from the workbook. Set column index in sheet for each column in .dbf sheet1.write(rowx,0,row.ID) book.save('C:/Output') print"Export finished"
sheet1.write(rowx,0,row.ID)
Solved! Go to Solution.