Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in excel report generation from jsp

 
vidya archana
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pls find the code below..

I am trying to generate the report from jsp:

<%
response.setContentType("application/vnd.ms-excel.xls");
response.setHeader("content-disposition","attachment;filename=test.xls");
%>

<html>
<head>
<title>Excel</title>
</head>
<body>
<table>
----data comes here
</table>
</body>

When i run this, i am getting a Open/Save dialog box. If i try to save the excel, i am able to vdo that without any problem. And if an excel instance is already opened in my system, and i select open option from the dialog box, again this report is getting opened. But at the same time, if no excel instance is already opened, and i try to open, the excel I am getting an error saying:
"c:\Documents and Settings\199872\Local Settings\Temporary Internet Files\Content.IE5\WV5VMYZ5\test[1].xls could not be found" Please check the file name..etc..

Pls help me in solving this..
[ December 10, 2007: Message edited by: vidya archana ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've seen that happen in MSIE 6 when the amount of files saved gets close to the limit set in MSIE. Try using Tools -> Menus -> ... delete temporary internet files.
See if that fixes it for you.
 
vidya archana
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still not working
 
Ray Johnson
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
similar errors mostly involve environment related issues such as installed versions of excel, windows & IE combinations, security setups. In case the problem is not solved yet, try the following things and see if they help
0. Check your MS Excel opens cleanly in your machine
1. Set buffer cache of that JSP page to 0 and see.
2. Save the spreadsheet to your local file system. Make sure all excel applications are closed. select the saved spreadsheet, right click and use open with IE and check for any significant delay/errors.
3. If you are in a office network, try from some of your other colleagues' systems, preferably those having different versions installed.

Post your findings. If nothing works, throw some more details on the error with details of your environment. good luck. in case, the problem is already fixed, can you share the steps used to fix?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic