File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how to open .xls file in new window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how to open .xls file in new window" Watch "how to open .xls file in new window" New topic
Author

how to open .xls file in new window

Mohan Reddy
Greenhorn

Joined: Feb 10, 2006
Posts: 21
Hi

I'm trying to open an excel file in new window after clicking on hyper link. But its displaying junk values.

Im using Tomcat with struts..

I tried setting mime type in web.xml file, by setting content type. But there is no use.

Please get me out of this problem.

Thnx in advance


cheers<br /> <br />mohan.<br /> <br /><br />Always do what you are afraid to do...
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Post your code and settings.


My blood is tested +ve for Java.
Mohan Reddy
Greenhorn

Joined: Feb 10, 2006
Posts: 21
Hi chetan

this is the code in my jsp page..(Im using struts over here)



<a href='/iDENPDR/uploadedfiles/PBP/<bean:write name="records" property="strFilePath"/>' target="new"><img STYLE='border-style:none' src='/iDENPDR/img/Excel.gif' alt='Build Plan Excel Sheet' time='16' height='16' align='middle'>


this is the code in my web.xml file

<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>


Please let me know the solution for this...


Thnx in advance...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to open .xls file in new window