Hi Beejal,
Dynamic namin g can be done as follows :
String filename ="filename.xls";
response.setHeader
("Content-Disposition", "attachment; filename="+filename);
Regards,
Jeenus.
________________________________
From: Beejal [mailto:[EMAIL PROTECTED]
Sent: Fri 2/8/2008 4:50 PM
To: 'Jakarta Commons Users List'
Subject: FW: Problem displaying excel file in browser
-----Original Message-----
From: Beejal [mailto:[EMAIL PROTECTED]
Sent: Friday, February 08, 2008 4:49 PM
To: 'Jakarta Commons Users List'
Subject: RE: Problem displaying excel file in browser
Hi All,
I am setting the mime type in response like this :
response.setContentType("application/vnd.ms-excel");
response.setHeader
("Content-Disposition", "attachment; filename=newExcel.xls");
Now, I want to name my file using some dynamically generated name, instead
of newExcel.xls.
I am able to generate the name dynamically, but how to pass it in the
response.setHeader so that the file gets saved with that generated name.
Regards,
Beejal
-----Original Message-----
From: Jeenus Johnson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 06, 2008 4:43 PM
To: Jakarta Commons Users List; [email protected]
Subject: RE: Problem displaying excel file in browser
Hi,
Generally one will have to set meta information to display excel sheet
,below is a small snippet of code ,hope I am answering your query.
html>
<head>
<title>Excel To Browser </title>
<meta HTTP-EQUIV="Content-Type" CONTENT="application/vnd.ms-excel"; />
<meta http-equiv="refresh" content="10;URL=/Xls/new_sheet.xls"> </meta>
</head>
<body >
</body>
</html>
Regards,
Jeenus.
________________________________
From: Beejal [mailto:[EMAIL PROTECTED]
Sent: Wed 2/6/2008 4:30 PM
To: [email protected]
Subject: Problem displaying excel file in browser
Hi,
Can anyone help me displaying an excel file in browser.
I have a WritableWorkbook object in my action class.
I want to display that workbook in the browser on click of download button.
How can I achieve this?
Thanks
Regards,
Beejal
http://www.patni.com <http://www.patni.com/> <http://www.patni.com/>
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail.
_____________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://www.patni.com <http://www.patni.com/>
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail.
_____________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]