|
|
Export HTML table inside JSP to Excel using Java
When I generate this table inside this JSP page, it will offer abutton for user to click if he/she decides to export the HTML tableinto an Excel sheet (which get displayed directly back in thebrowser), then user can save his/her this Excel spreadsheet into his/her local file system.Can someone help me on how I can convert this HTML table to Excelusing XSLT? Sample code would really help also, if there's any URL torefer me to.Is it a good idea to generate the Excel file (as temporary file whichto be sent back to browser later if user click the button) at the sametime when the HTML table get generated? Then remove this temporaryExcel file later.Any comments? Thanks,Jimmy
|
|
-1
|
|
|
|
Reply
|
jimmy_please (46)
|
6/20/2007 5:51:43 PM |
|
On Jun 20, 10:51 pm, Jimmy <jimmy_ple...@yahoo.com> wrote:> When I generate this table inside this JSP page, it will offer a> button for user to click if he/she decides to export the HTML table> into an Excel sheet (which get displayed directly back in the> browser), then user can save his/her this Excel spreadsheet into his/> her local file system.>> Can someone help me on how I can convert this HTML table to Excel> using XSLT? Sample code would really help also, if there's any URL to> refer me to.>> Is it a good idea to generate the Excel file (as temporary file which> to be sent back to browser later if user click the button) at the same> time when the HTML table get generated? Then remove this temporary> Excel file later.>> Any comments? Thanks,> JimmyA simple trick worked for me..Click on the link "Export to excel"and forward the user to new JSP and recreate the table using HTML andmake sure that contentType of that page is set to "application/vnd-msexcel"Reagrds'Dhananjay
|
|
3
|
|
|
|
Reply
|
Dhananjay
|
6/21/2007 5:50:06 AM
|
|
Thanks it works but the excel sheet opens up in a separate MS-Excelapp's window. How can I have this excel sheet open-up/view inside theweb browser (i.e. IE or Firefox)? Or even open-up/view this excelsheet inside a frame of a browser?Thanks again,Jimmy
|
|
0
|
|
|
|
Reply
|
Jimmy
|
6/21/2007 1:36:26 PM
|
|
|
2 Replies
1420 Views
(page loaded in 0.059 seconds)
|
|
|
|
|
|
|
|
|