Skip to content

BUG: read_excel fuction return "zipfile.BadZipFile: File is not a zip file" #56810

@dogeCoinMasterCoin

Description

@dogeCoinMasterCoin

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

df = pd.read_excel(excel_file_path, sheet_name=sheet_name, engine='openpyxl')

Issue Description

Problem is a little bit odd due to a problem related only to an excel. I try to read some data from an excel, the code works perfectly fine with an excel created by me. I have an excel from PTC tool and with that excel when i try to read from it i get this error:

raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Did somebody know what problem can have an excel to raise this error? I can't put that excel here due to privacy policies, but it's not a complex one, actually have only some pivoted rows and tables, no functions behind or something else. Maybe one more thing to be mentioned, this excel was set to confidential as security manager , but i tried to remove that attribute and I've got the same error.

Expected Behavior

Read from that excel

Installed Versions

Python - 3.6.4 Office package - 2021

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO Excelread_excel, to_excelNeeds InfoClarification about behavior needed to assess issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions