xlsx and xlsm files return badzipfile: file is not a zip file

前端 未结 13 1640
灰色年华
灰色年华 2020-12-30 05:48

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 wh

13条回答
  •  天命终不由人
    2020-12-30 06:24

    In my case the file I accessed had been previously opened and not properly closed by the Workbook.save() method. Because I was debugging my code and failed on this command due to an incorrect path the file became corrupt. I had to delete the file since it could not be restored and create a new one.

提交回复
热议问题