Export dataset to XLS filetype from Time Series Chart

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.

https://forum.inductiveautomation.com/t/exportdatasets-for-the-easy-chart-component/9618

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.

Thanks in advance.