I have this button on my html page. When I click it, exportCOAExcel gets triggered. Then a excel workbook is generated and save to a path.
I want a prompt to come to say which path you want to download the file to? or save to the deafult 'download' folder location of the browser.
@GetMapping(value = "/coaExport", params = "action=excel")
public void exportCOAExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {
XSSFWorkbook workbook = new XSSFWorkbook();
//loogic to fill up the excel workbook with data
FileOutputStream outputStream = new
FileOutputStream("C:\\Users\\user\\Desktop\\revenue.xls");
workbook.write(outputStream);
outputStream.close();
}