I'm trying to open both an xlsx file and an xlsm file both give me the same error
badzipfile: file is not a zip file
here is what I'm typing:
import openpyxl
wb=openpyxl.load_workbook('c:\\users\\me\\documents\\filename.xlsm', keep_vba=True)
wb2=openpyxl.load_workbook('c:\\users\\me\\documents\\filename2.xlsx')
both load_workbook
commands result in the same error. They both exist at that location. why am I getting this error?
The same problem occurred to me, and then I noticed the following:
When I created the .xlsx file from file manager, by creating new document with .xlsx format, I had the same error. But when I created the file with some spreadsheet software (libreoffice-calc) in my case, it just worked fine. I hope this may help.