I am trying to use xlsxwriter to generate report on excel. But I found that this package was not installed on the ignition gateway under “C:\Program Files\Inductive Automation\Ignition\user-lib\pylib”.
I thought this package should be default package by ignition.
Here’s the ignition version installed.
Here’s packages installed. It misses numpy, xlsxwriter and some other packages.
Can anyone help to advise what causes this issue?
Also I tried to copy the xlsxwriter folder from my local ignition folder to the remote gateway, but it’s not working after the copy is completed, still saying the xlsxwriter lib cannot be found.
Should I reboot the remote gateway? It has multiple projects running at the moment, not easy to find a suitable time to reboot it.
I saw other posts mentioning the apache poi but I wasnt able to find an example or user manual on how it is used to write to excel. All I can find it how to read from excel.
Would you please advise where I can find the instruction manual?
The JavaDocs are most important. Keep in mind that you’d be using jython syntax with the java API. There are examples in Ignition here on the forum (by others) of both reading and writing. Ignition’s built-in scripting tools for excel (system.dataset.exportExcel and system.dataset.toExcel) both use this library under the hood.
Someone manually installed it. No version of Ignition has 'shipped' with xlsxwriter. It looks like version 2.0.0 was the last with support for Python 2, but it claims no external dependencies besides the standard library, so you could try manually installing it. https://xlsxwriter.readthedocs.io/changes.html#release-2-0-0-august-9-2021
I would recommend POI though, for both performance and future maintenance debt.