Download excel/csv document from a grid on a single click

Certified Lead Developer

My requirement is as below:

I have a set of Ids, and using an integration I am getting all details of the records of those Ids. After certain manipulation of the dataset, i am displaying the dataset on a grid.

Now I want to download the same grid to an excel/csv document.

Please note, I am not saving the data in any table so I can't use export to csv from DSE option.

What I have tried is using an document WebApi where I pass my Ids and get the details and download the document. 

The problem with this approach is: 1) I have to call the integration again and do those manipulations again

2) The Ids I am passing as query parameters. When there are more than 1000 ids, the url is becoming too long and the API is failing.

Can anyone please suggest an alternative approach to resolve this issue

TIA

  Discussion posts and replies are publicly visible