How to get all the data for the table cell

Hi,

We need to save the user-defined tables. But the data from the data source can change at any time, so we need to save the generated history table. But the amount of data is too large, we only need to save a two-dimensional table, not all the data.

I’ve found the getCell() function, but I want a better way to get all the table data.
Please let me know if any resolution is available for this issue.
 

6 answers

Public
Dmytro Zvazhii Flexmonster July 3, 2018

Hello Ailie,
Thank you for your question. We recommend using the getReport() API call to save the current pivot state: https://www.flexmonster.com/api/getreport/. It can be easily restored in future. In case you need to save it to the file please use save() API call: https://www.flexmonster.com/api/save/. If you want to store another representation of the current pivot’s view we recommend trying the CSV export. Please find the code example here: https://www.flexmonster.com/api/exportto/
Let us know if the information above was helpful for you.
Regards,
Dmytro

Public
Ailie July 11, 2018

Hi Dmytro Zvazhii, thanks for your answear.
We’re using nodejs’s express framework, so there’s no way to use Data Compressor. Is there any way to get CSV data without exporting the file?

Public
Tanya Gryshko Flexmonster July 11, 2018

Hello, Ailie,
Thank you for your quick response!
Exporting the CSV file does not require the usage of Data Compressor. exportTo API call exports all data currently displayed on the grid. When exporting to CSV, you can also specify a callback handler to get the resulting data not only in the file. This handler should be specified the following way:

flexmonster.exportTo('csv', {filename : 'flexmonster.csv'}, 
function(result) {console.log(result.data)}
);

Hope it helps.
Regards,
Tanya

Public
Ailie July 12, 2018

Hi Dmytro Zvazhii, thanks for your answear.
But I don’t want to export the file, I just want to get the data in CSV format.

Public
Ailie July 12, 2018

I want to store the data in CSV format, but I don’t want to export files.I can only use data compression on the server side or get CSV data and store it. And we use nodejs’s express framework.
Please let me know if any resolution is available for this issue.

Public
Dmytro Zvazhii Flexmonster July 12, 2018

Dear Ailie!

Unfortunately, there is no better solution for your case.

Please login or Register to Submit Answer