AnsweredAssumed Answered

Problem writing all columns with xlwt

Question asked by Xhosa on May 21, 2013
Latest reply on May 21, 2013 by Xhosa
Hello, I am having an issue getting all of the values from my table written into the .xls I can get a single row, but need all of the columns.

# 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)'C:/Output')   print"Export finished" 

In the line

I need 3 parameters where rowx = walks through and gets all values in every row - 0 = column index of where the values are written in the xls & row.ID = the column that is being written from table.

Any help is greatly appreciated.