File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
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:
File download in struts2
downloading a file struts2
how to download a file in struts2
Problem in using "exportParameters" in struts2
struts2 file download from database
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015