A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
Joined: Feb 13, 2012
Feb 14, 2012 22:03:38
I searched a lot to create a "save as excel".
Add the values to
sheet along with the creating the excel file.
I knew that creating excel file.when access this file,it should pop up a dialog box as "save as".
document.execCommand('SaveAs', false, "filename");
I tried in jsp using some code.
Can you please help me with the Struts2
<action name="saveas" method="saveAS" class="saveAsAction"> <result name="sendFile" type="stream"> <param name="inputName">savePreferences</param> <param name="contentType">xls</param> <param name="contentDisposition">attachment;filename="CUSTOMER.xls"</param> <param name="bufferSize">4096</param> </result> </action>
i tried in jsp
response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition", "attachment;filename=\"j.xls\"");
I agree. Here's the link:
- it saves me about five hours per week
downloading a file struts2
File download in struts2
struts2 file download from database
how to download a file in struts2
Problem in using "exportParameters" in struts2
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013