i have a file contain more than 950,000 rows , When I convert file from Text to xls, it gives this error during conversion. How can I modify the code to resolve this error:
ValueError: row index was 65536, not allowed by .xls format
Also if i convert the text file to xlsx format it gives the same error
Any guidance would be greatly appreciated.
How do I edit the code to resolve this error?
import xlwt
import io
book = xlwt.Workbook()
ws = book.add_sheet('First Sheet') # Add a sheet
with io.open("data.txt", mode="r", encoding="utf-8") as f:
for row_idx, row in enumerate(f):
row = row.rstrip()
ws.write(row_idx, 0, row[0:8])
.
.
.
# and so on...
book.save("excelfile.xls")# if i edit book.save("excelfile.xlxs") it gives the same error