I have a spring boot app. So on the User Interface, there is an Advanced Search section where user selects 5-7 things from the text box and based on these parameters, a web service is called. The webservice returns the search results in a JSON format and those records are displayed in a tabular format in the User Interface. My goal is to download all the records into an excel file when a user hits a Download button.
So I have a Download button below the tabular section where all records are displayed.
If I have to download the records in excel format as soon as user clicks the download button, is there something like the following feasible or a good solution?
As soon as search results are sent back to the user interface in JSON format, I can have those records inserted into some temp table in the database. So when a user clicks on the Download button, using
Java, I can grab all the records, convert it into CSV file and present it to the user for saving purpose. Please suggest if this is even possible or any other better approach .