Derekr
February 20, 2021, 4:40am
1
I am trying to figure our how to export data from a power table to excel formatted as an excel table, any help would be apprecated.
What version of Ignition?
I know the topic is different, but trust me.
The Apache POI libraries are included with Ignition. At the time I was only needing to read files, so xlrd was all that was necessary.
I'm just starting to dig into POI, myself, but here's a start:
EDIT 2021-08-23: Updated to allow JsonDataSets. Changed to allow for a ByteArray output instead of writing to a file.
EDIT 2023-01-20: Added option for date formats. Default is 'yyyy-MM-dd hh:mm:ss'.
EDIT 2023-05-12: Added options for first row and column, if needed to offset from A1
def datasetT…
Derekr
February 23, 2021, 3:36pm
5
def datasetToExcel(dsIn, fileName, sheetName = 'Sheet1'): import org.apache.poi.ss.usermodel.Cell as Cell import org.apache.poi.ss.usermodel.Row as Row import org.apache.poi.ss.usermodel.Sheet as Sheet import org.apache.poi.ss.usermodel.Workbook as Workbook import org.apache.poi.xssf.usermodel.…
Thank you. I am unfamiliar with apache.poi so I need to do some research, but at least I have a place to start.
Hi @Derekr , may I know that did you solve the problem that you mentioned above because I also studying this thread which recommend by @JordanCClark and I also unfamiliar with apache.poi so if you had done some script. Hope you can share with me for refer purpose.
Thanks in advance
Derekr
August 5, 2021, 7:56pm
7
Sorry Tohhy I did not. The solution was too complicated so we dropped it