Sto tentando di aprire un file xlsx e di stampare solo il contenuto di esso. Continuo a correre in questo errore:Errore: formato non supportato o file corrotto: record BOF previsto
import xlrd
book = xlrd.open_workbook("file.xlsx")
print "The number of worksheets is", book.nsheets
print "Worksheet name(s):", book.sheet_names()
print
sh = book.sheet_by_index(0)
print sh.name, sh.nrows, sh.ncols
print
print "Cell D30 is", sh.cell_value(rowx=29, colx=3)
print
for rx in range(5):
print sh.row(rx)
print
esso stampa questo errore
raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found '\xff\xfeT\x00i\x00m\x00'
Grazie
Qual è la tua versione di xlrd? –
9.2 Credo che sia il più recente – user2353003