| Author |
Opening the excel file multiple times
|
sreenath reddy
Ranch Hand
Joined: Sep 21, 2003
Posts: 415
|
|
Hi In my system , i have excel reports in my server disk . And i am opening the excel files through an action class like /viewReport.do?id=23 .....and thus from the action class i open my excel file . After opening one excel file , i try to open another excel by clicking that link , then my system often hangs else excel shows an error saying "a report with name viewReport.do is already open " even though both of these files are different on the server How can i avoid this ?? The reason why i am opening the excel file through an action class is , i need to perform some operations before opening that excel report Can any one let me know how to go abt this ??
|
 |
Santhosh Kumar
Ranch Hand
Joined: Nov 07, 2000
Posts: 242
|
|
|
This is typical restriction with Excel application. Forget about opening it from the web, you cannot open two excel files with same name (may be different path) at the same time. Don't know why this stupid restriction. I think there is some constant to specify while streaming the Excel data into the OutputStream, to specify a file name. With this, I guess you can void this issue.
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
Try putting this statement in your action before outputting the stream that contains your excel file: response.setHeader("Content-disposition","attachment; filename=myWorksheet.xls"); Make the file name different for each spreadsheet. I haven't tried this, but it seems logical that it might work.
|
Merrill
Consultant, Sima Solutions
|
 |
Harinath Kuntamukkala
Ranch Hand
Joined: May 17, 2005
Posts: 37
|
|
Hi The same problem with popup windows. we cant open two popup windows even they are two different paths in same page.
|
 |
sreenath reddy
Ranch Hand
Joined: Sep 21, 2003
Posts: 415
|
|
Hi Merill Even setting that header is of no use .i tried that ....actually i am opening that excel in a frame using viewReport.do?reportId=28 and in the temporary interntfiles folder in windows its saving the file with the same URL and thus opening the other file (takes the same url) is causing the problem can any let me know if u have any ideas Regards Sreenath
|
 |
 |
|
|
subject: Opening the excel file multiple times
|
|
|