aspose file tools*
The moose likes JSP and the fly likes Problem with excel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with excel" Watch "Problem with excel" New topic
Author

Problem with excel

Karthik Vijayarajan
Ranch Hand

Joined: Mar 13, 2005
Posts: 43
Hi
I am trying to open an excel sheet from my JSP. I used the following code in my JSP to get it working.

response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "attachment;filename=ExcelBaselineMovedOut.xls");

When the browser is opening the excel, i am getting a message that reads


'C:\Documents and Settings\local files....\Temporary internet files\Content.IE5\7VCTHHP2\ExcelBaselineMovedOut.xls'cannot be found.
check the spelling of the file name and verify that the file location is correct.If you are trying to open the file from your list of most recently used files on the File menu,make sure that the file has not been renamed,moved or deleted


I tried deleting the temporary internet files. It works sometimes,but most of the times it doesn't work fine.

Would be great if someone can advice on this.

Thanks
Karthik


Karthik <br />SCJP 1.4 SCWCD 1.4 SCBCD 1.3
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I'm guessing this is a pretty large file.

I've seen this happen with MSIE when there isn't enough room in your temporary internet files dir (TIF) to hold the file. Instead of telling you this, MSIE just skips the download and moves on to the section of code that tries to read the file. For us, telling the client to empty their TIF dir usually satisfies them.

Try increasing the max size setting for your TIF directory.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Karthik Vijayarajan
Ranch Hand

Joined: Mar 13, 2005
Posts: 43
Hi
Thanks for the reply.
Even if i have 10 records,i am not able to open the excel.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with excel