Using Openpyxl 3rd party python library


I’m trying to get openpyxl to work with Jython. I’ve followed steps from:
[Procedure for installing python libraries from source](http://Installing 3rd party python libraries)

and have used pip to install openpyxl using jython2.7.1. I can even see it in Ignition when I do help(“modules”). When I try to
import openpyxl
I get this error, even though I know that datetime functions work… there is a in that cache folder… maybe that’s messing it up. Any luck with this?


Traceback (most recent call last):
File “”, line 2, in
File “C:\Users\controls.ignition\cache\gwlocalhost_8088\C0\pylib\”, line 6, in
from openpyxl.workbook import Workbook
File “C:\Users\controls.ignition\cache\gwlocalhost_8088\C0\pylib\openpyxl\”, line 4, in
from .workbook import Workbook
File “C:\Users\controls.ignition\cache\gwlocalhost_8088\C0\pylib\openpyxl\workbook\”, line 7, in
from openpyxl.worksheet.worksheet import Worksheet
File “C:\Users\controls.ignition\cache\gwlocalhost_8088\C0\pylib\openpyxl\worksheet\”, line 24, in
from openpyxl.cell import Cell, MergedCell
File “C:\Users\controls.ignition\cache\gwlocalhost_8088\C0\pylib\openpyxl\”, line 3, in
from .cell import Cell, WriteOnlyCell, MergedCell
File “C:\Users\controls.ignition\cache\gwlocalhost_8088\C0\pylib\openpyxl\cell\”, line 28, in
from openpyxl.utils.datetime import (
File “C:\Users\controls.ignition\cache\gwlocalhost_8088\C0\pylib\openpyxl\utils\”, line 8, in
from datetime import timedelta, tzinfo
ImportError: cannot import name timedelta

Fairly certain it’s not vanilla python. Some of the inits import NUMPY and PANDAS which are CPython based. Unfortunately our Jython interpreter can’t handle Cpython libraries.

1 Like

Latest version of openpyxl doesn’t support python 2.7. I downloaded the last version that supports it and am using it successfully - version 2.6.4. Only issue is that is uses SAX XML parser, which isn’t available in Vision, only in Designer. So, having to run scripts on Gateway instead of Client.