openpyxl 1.5.6

Small compatibility release this time, no big features added, see the changelog by yourself:

  • [iter_worksheet] add support for calculated strings (they have a special data type for that ?)
  • [strings] make sure we always use unicode strings everywhere
  • [iter] fixed max row and column detection for iter reader
  • [styles] fixed custom number format detection under OOCalc
However, a large effort has been made on supporting the whole python 2.4 – 2.7 range. In the past, 2.4 and 2.5 compatibilities were damaged, now it should be restored back to normal.
Once again, thanks to all the contributors for their help ๐Ÿ˜‰

11 responses to “openpyxl 1.5.6

  1. Thanks so much for your work on this. It’s proven to be really helpful. The only thing that stands in the way so far is the documentation. I would really like to help you if you need a hand with it.

    • Hi, actually I don’t know as it’s using a lot of CPython libraries to handle xml parsing. If you manage to run it successfully with IronPython let me know, and if you need help setting things up, you can still contact me with a traceback. Good luck ! ๐Ÿ™‚

      • Hello,

        I tried to use it with Ironpython but it didnยดt work:

        Message: No module named expat; use SimpleXMLTreeBuilder instead

        line 1445, in __init__, “C:\Programme\Rhinoceros 5.0\Plug-ins\IronPython\Lib\xml\etree\”
        line 1280, in XML, “C:\Programme\Rhinoceros 5.0\Plug-ins\IronPython\Lib\xml\etree\”
        line 35, in write_theme, “C:\…scripts\openpyxl\writer\”
        line 75, in write_data, “C:\…scripts\openpyxl\writer\”
        line 146, in save, “C:\…scripts\openpyxl\writer\”
        line 163, in save_workbook, “C:\…scripts\openpyxl\writer\”
        line 232, in save, “C:\…scripts\openpyxl\”
        line 8, in , “C:\…scripts\”

        Is there any chance to fix this?

  2. I used openpyxl to write files using CPython just fine, but I had to switch to IronPython, and although I got it to install(after installing jdcal seperately), the files I write using IronPython are corrupted. I don’t get any errors or tracebacks, but Excel refuses to open the files.

    I opened the files with Winzip and extracted the contents. The only file that is different is in filename\xl\Worksheets\sheet1.xml. In the corrupt file, there are lots of “Value must be type ‘xx’, where ‘xx’ is float, int, bool, etc, messages, like this:

    Obviously an XML library is not happy. Any ideas? I don’t have time to troubleshoot this properly right now, and I don’t have another way to write the files. I tried using COM through .NET, and I get unexplained errors invoking Save. I am rather stuck.

    • Hey Arnie, well, this looks like the IronPython XML library is not behaving like the CPython one indeed. What you could do is just keep your CPython version, wrap it in a CLI script and call it through subprocess maybe ? I don’t use IronPython nor Charlie does, so we’re not being able to help much here, and CPython has always been our “target” interpreter. However, if you or someone else finds a compatibility shim that fixes openpyxl in IronPython (while not breaking the CPython one obviously), feel free to submit a pull request ๐Ÿ™‚

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s