+ 1
Read and Write Excel files in Python
I am trying to read an Excel file and to write one. However, in the first case the file can't be found (and if I add the location, it considers it as corrupted). df=pd.read_excel (filename, sheetname="Sheet1") Error: XLRDERROR: Unsupported format, or corrupt file: Expected BOF record; found b'<?xml ve' When I try to write one, the file ends up existing nowhere. workbook = xlsxwriter.Workbook('pythontest.xlsx') worksheet= workbook.add_worksheet() Any clue?
3 Respuestas
+ 2
Check your file first, it might not be a xls or xlsx file. Refer below for more help:
https://stackoverflow.com/questions/9623029/JUMP_LINK__&&__python__&&__JUMP_LINK-xlrd-unsupported-format-or-corrupt-file
0
I think u doing mistake in entering location of file
0
When I write:
open(filename)
It opens...