This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Saving JSP output to a File with extension .xls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Saving JSP output to a File with extension .xls" Watch "Saving JSP output to a File with extension .xls" New topic
Author

Saving JSP output to a File with extension .xls

peter brews
Greenhorn

Joined: Feb 11, 2002
Posts: 20
Hi
I have tp save the JSP output to a file. I have set the header to response.setContentType(application/ms-excel). I get a dialog box for the output. Save/Open when I hit Open it opens up the output in Excel. But when I click Save it asks me for a file name and the name it displays in a .jsp file and the user manually have to change the name to .xls file while saving.
IS there a way where If I click save instead of the .jsp as the filename it is displayed as a .xls file in the file dialogue box.
Thanks
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

This is a little HTTP trick to do what you want:

Dave
 
Don't get me started about those stupid light bulbs.
 
subject: Saving JSP output to a File with extension .xls
 
Similar Threads
Export data from Jsp to Excel taking more load time
Problem on opening .XLSX file
JSP-EXCEL save defualt in .xls extension, open excel with in the browser
Opening excel sheet separately
Export to excel question