Currently I have a configurable Time Series Chart which the user is able to choose the start date and end date. After the user generate the chart I would like export the dataset in xls format. May I know what is the best way to do it because I had tried in many ways but it dint work.
Image above show the time series chart and the dataset in Ignition Designer. May I know how can I read the dataset and export the xls file format or I should read the timeserieschart data then only export in xls format.
@JordanCClark Hi Bro, thanks for your link but this is not the one I want. What I want is export the data in the dataset to excel format by clicking a button in the perspective. So I think what I need to use is system.dataset.toExcel but I had tried this code but it dint work. May I know that is there any example.
Hi, @JordanCClark I had tried by following the thread you provided but I still facing some problems which I could not get the dataset from the Time Series Chart as the image shown below.
The thread that you provided is hard code the dataset inside the script. In my case, I would like to get the dataset from Time Series Chart like the image above. May I know how can I do that ?
Image below show the hard code of the data set in the script.
Link above is the exportDatasets() for the easy chart component. May I know did you try these before because I could not found this code in the Ignition documentation.
Finally got some time to dig into this a bit further for you.
I updated the linked script to allow for JsonDataSets, and to allow the output to be a byte array.
I put the function into a project script (I used util), than called it from a button:
The script mentioned above has been implemented, now i can able to download multiple dataset in single excel file at different sheets.
Now i need to change the sheet names using script , can you please help on this
(Dataset1,Dataset2,Dataset3.......) to different names , refer to the screenshot.