Hi,
I have a requirement in SPC where user would like to export the data from perspective as csv/excel and feed the results to highlighted columns (where formulas are there) in below pic.
So, i have uploaded this file as blob in db but i dont know how to proceed further to send the data to this excel.
Your ideas are welcome.
There are numerous examples on this forum showing how to perform custom operations with Excel files via the Apache POI libraries that are provided with Ignition:
https://forum.inductiveautomation.com/search?q=apache%20poi%20excel%20perspective%20order%3Alatest
Most of these topics perform one the two following general sequences:
- Read:
- Upload a workbook (Perspective) or read a local workbook file (Vision), then
- Extract desired information from the content of the workbook, and finally
- Save the extracted data either in a database or in Ignition tags.
- Write:
- Collect data from a database or a historian or from Ignition tags, then
- Construct a workbook from scratch in some desired layout, and finally
- Download the finished file (Perspective) or write the finished file locally (Vision).
Your task is slightly more complicated, as it is parts of both of the above:
- Upload a workbook (Perspective) or read a local workbook file (Vision), then
- Collect data from a database or a historian or from Ignition tags, and then
- Access the "SPC" sheet of the workbook and insert the desired data, and finally
- Download the finished file (Perspective) or write the finished file locally (Vision).
You will have to study the topics I linked, and possibly the Apache POI documentation.
1 Like