Error opening xlsx files saved with openpyxl on Mac 10.6.8

Issue #383 invalid
Ivana
created an issue

Hello,
I have tried editing the excel file using following lines

wb = openpyxl.load_workbook('test.xlsx')
wb.save('here.xlsx')

Lines above do work fine, and file is being saved
But when I try opening the file test.xlsx on Mac 10.6.8 using Windows Excel 14.0.0 I keep on getting error "File cant be opened. Wrong format... corrupted file"
If I use Open Office (on Mac) to open saved file text.xlsx, it works without any errors
Thanks

Comments (9)

  1. CharlieC

    I suspect there is an issue in one of the libraries. What version of Python do you have? Do you have lxml installed? Can you provide a sample file? And how can you use Windows Excel 14 (which version is this) on Mac OS?

  2. CharlieC

    The problem looks to be with the way the archive was created so I suspect it may be a problem with your Python install. Are you using the system Python? If so can you please install a version using a download from Python.org or MacPorts or Homebrew and see if the problem persists.

    Specifically there was a problem with Python 2.7.4 and zipfiles though it seems unrelated. But the zipfile is certainly broken. OpenOffice must have a very robust implementation of the zip library.

  3. CharlieC

    The problem is outside openpyxl and probably related to the zipfile or zlib libraries. Some 2.7 versions had known problems with zipfile and Mac OS 10.6 came with a pretty broken version of Python.

  4. Log in to comment