Search code examples
pythonexcelopenpyxlxlsx

Error meanwhile loading an .xlsx file with openpyxl library


Good afternoon,

since some weeks I've a problem during the loading of .xlsx file protected where one of that sheet is protected with password.

workbook = openpyxl.load_workbook("myFile.xlsx")

If i free the sheet from the password openpyxl work fine, if i put the password i get this error:

"Excel opening errorFile is not a zip file"

I read on the web that recently Microsoft change somethings in the .xlsx format but no more. Thank you


Solution

  • Based on this issue in the openpyxl bug tracker, password-protected files are not supported.

    – Password protection is currently not supported.

    – Will this ever be supported?

    – no, because it's proprietary MS code not covered by the OOXML specification.