2👍
The reason for that is because xlrd
module does not have open_openwork()
function in it.
The function you may be looking for is open_workbook()
:
open_workbook(...)
– Open a spreadsheet file for data extraction.
Plus there is nothing about the mode in the docs – by providing second argument you set the log file (opened file object to which messages will be read).
So instead of:
bk = xlrd.open_openwork("fname","rb")
do:
bk = xlrd.open_workbook("fname")
Source:stackexchange.com