no i tried all the options..
from the server side,IE doesnt open the excel embbedded in a excel..

but to try i just saved the html on my computer and hardoced a test.xls to open when
i click the button..in this case,the excel opens in a excel embedded within the browser..

but when i call from the server thru a URL,it opens as a simple text file(with in the browser window)..

i also tried creating that excel using sourforge.net excel utilities..but the problem
is not with the excel but with some content setting in the server i suppose..

http://yourserver.com/path/to/test.xls  -> opens excel contents as a text format within the browser

but when i use the code window.open("test.xls") in a html page saved on my local machine it opens
up with in a excel sheet embedded in the browser itself..

this is the behavior..i find this beahior in another tomcat  environment also..

Pavan Kumar
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



"Allistair Crossley" <[EMAIL PROTECTED]>

02/06/2004 06:20 AM

Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>

To
"Tomcat Users List" <[EMAIL PROTECTED]>
cc
Subject
RE: Excel Mime problem





What happens if you type the URL of the XLS directly into IE?

http://yourserver.com/path/to/test.xls

Does Excel boot up in this case? IE should automatically recognise the .xls extension on the file. If it does not then you probably need to look at your IE settings.

When you say the contents of the xls are printed to screen do you mean that BINARY excel is printed OR do you mean that you have created a CSV comma separated format file and saved that with a .XLS extension and that is what you get.

The window.open("http://yourserver.com/path/to/test.xls", "windowName") should work IF you have the test.xls on the file system and the URL is correct. Try the absolute path instead of relative also...

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 06 February 2004 10:51
To: Tomcat Users List
Subject: RE: Excel Mime problem



Allistar,

let me clarify..i generate a excel file by some servlet when the user clicks a button on the page.
and that i place in the root directory..when the refreshes(after the user hits the button),i want to open
a window of the browser expecting that IE will open that in a excel embedded in the browser..
but IE is openeing that as a text..

so where should i keep the content type code....iam using a window.open(",,.,,/../test.xls")

i dont want to open a jsp in excel

Pavan Kumar
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


"Allistair Crossley" <[EMAIL PROTECTED]>
02/06/2004 05:02 AM
Please respond to
"Tomcat Users List" <[EMAIL PROTECTED]>

To"Tomcat Users List" <[EMAIL PROTECTED]>
cc
SubjectRE: Excel Mime problem







I've just done this today! :) The following JSP boots up in Excel..you need to set the content type before ANYTHING else happens with the output stream

<%
response.setContentType("application/vnd.ms-excel");
response.addHeader("Content-Disposition", "attachment;filename=myExcelTest.xls");
%>

1
5

ADC

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 06 February 2004 09:54
To: Tomcat Users List
Subject: Excel Mime problem



hi there,

iam using tomcat 5 version..i  have a requirement
where my jsp will generate a excel sheet and places in the server directory..
but the problem is when i open the excel thru a _javascript_ from a browser window,i actually get the
excel in text format on the browser itself..

i tested the same excel sheet using a static html page,it opens in excel format within the
browser.

are theere any specific mime type settings to be set..i already tried with application/vnd.ms-excel

any help is appreciated

TIA
Pavan Kumar
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href=""> Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT00005062    

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ForwardSourceID:NT000050A2    
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the addressee. 
Unauthorized use, disclosure or copying is strictly prohibited and may constitute 
unlawful act and can possibly attract legal action, civil and/or criminal. The 
contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk 
and neither the originator of this message nor Tata Consultancy Services takes any 
responsibility or liability towards the same. Opinions, conclusions and any other 
information contained in this message
that do not relate to the official business of Tata Consultancy Services shall be 
understood as neither given nor endorsed by Tata Consultancy Services or any affiliate 
of Tata Consultancy Services. If you have received this message in error, you should 
destroy this message and may please notify the sender by e-mail. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to