Download an Excel using Servlet
How to download an Excel using Servlet? Create a workbook using any frameworks and write out the created workbook to response.getoutputstream(). For creating the excelsheet I am using apache poi. Set the content type of response to “application/vnd.ms-excel” and set response header as “Content-Disposition”, “attachment; filename=YourExcelName.xls”. Download an Excel using Servlet Example Discussion Should I close HttpServletResponse.getOutputStream()? You … Read more