Using 3rd party Python Libraries

Hello, I am trying to parse a xlsx file in a script. I know there are various libraries which can do this but the one I was trying to use is openpyxl. I know Ignition supports 3rd party libraries by putting them into the Ignition python library folder. However, this library does not work when simply extracted into the directory. It has installer files and I think that it has to be installed to work correctly. I was wondering if anyone had any advice on how I can use this library inside of Ignition or other ways to parse an xlsx file.

Thanks!

I don’t think your chosen library will be compatible with Ignition.

Ignition uses Jython 2.5. The openpyxl project seems to have dependencies in numpy and pandas, which both rely on CPython native extensions.

requirements.txt outlines many incompatible dependencies

setup.py calls for python versions of 2.7+

I’ve used this 3rd party module from @nmudge before for reading and writing to Excel files. It provides nice wrappers for Apache POI library.

2 Likes

You can use “xlsxwriter” library.
It’s the only python library compatible with Jython 2.5
There is only one issue… it only creates excel file. It is not possible to edit ad already existing file, you will have to create a new file every time.
Just download it from the pypi.com page
And here it is the knowledge base http://xlsxwriter.readthedocs.io/index.html

3 Likes

Thanks, I used this linked 3rd party module here and it worked great.

1 Like