How to give seperate file names for xls reports genetared usinf POI
Joined: Jul 30, 2009
I am using apache POI to generate reports in excel format which will be displayed in Internet Explorer window.
I am creating the excel file in a folder and reading that from my action page and displaying it in IE using response.setContentType("application/vnd.ms-excel");
Because of this every time I generate a report the name of the file is shown as Report.do for all reports. How can I set the file name?
Any help will be appreciated.
Joined: Mar 22, 2005
Are you setting a Content-Disposition header? Something like:
I am getting a popup saying download file which has option to Open/Save/Cancel. If I save the file then it get saved with the report name [reportEntity.getReportName()] but if I click Open then it is opening in IE and then if I try to do save as, it shows "Copy of Reports.do" as file name.