ParamQuery

General Category => Help for ParamQuery Pro => Topic started by: mflouty on May 10, 2021, 11:11:42 pm

Title: Export Excel feature
Post by: mflouty on May 10, 2021, 11:11:42 pm
Hi,

We are trying to remove the usage of the Session in the ASP.net MVC implementation of Export to CSV functionality mentioned @ https://paramquery.com/pro/demos33#. This mentions a HttpPost and HttpGet action method, post saving the session object and get then using it to generate the file.

Is there an implementation which can merge both of them into single action method that avoid usage of Session? There could be other ways like using a file or DB to save the contents but we want to know if there is an implementation inbuilt.

Thanks.
Title: Re: Export Excel feature
Post by: paramvir on May 11, 2021, 11:17:30 am
mflouty

Local export:

Easy solution is to use local generation of exported file using FileSaver. Its example is here: https://paramquery.com/pro/demos33/export_local

Remote export:

Remote generation of export file is a 2 step process and it can't be merged into a single step.

Reason for using Session variables is because they are unique for every user by design.

File or Db can be used but then you have to take care to make them unique for every user and then clean afterwards which might involve more coding and maintenance.