How to specify a filename when exporting to EXCEL?

O

orlat84

Hi,

I have a servlet that generates a report and exports it as XLS. When I
open it in Internet Explorer I get the XLS report but the problem is
that instead of the name I have set to the report I get the name of the
servlet.
For setting the name I use: response.setHeader("Content-Disposition",
"inline; report.xls");

When I want to save the file, the file name is not report.xls as
expected, but ReportGenerator.xls(the name of the servlet that
generates the report)

Even more if I use: response.setHeader("Content-Disposition",
"attachment; report.xls");

everything works as expected.

Anyone any clues?

Thank you,
Florin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top