File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Not able to open new browser instance for opening a xls in Secure Mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Not able to open new browser instance for opening a xls in Secure Mode" Watch "Not able to open new browser instance for opening a xls in Secure Mode" New topic
Author

Not able to open new browser instance for opening a xls in Secure Mode

Srilakshmi Munukutla
Greenhorn

Joined: Dec 07, 2005
Posts: 2
I am trying to open a excel through the Java code in struts Framework.
The Piece of code I am using for this is:
response.setContentType(CONTENT_TYPE_XLS);
StringBuffer sbContentDisp = new StringBuffer();
sbContentDisp.append(CONTENT_DISPOSITION_INLINE_FILENAME);
sbContentDisp.append(FILE_PREFIX);
sbContentDisp.append(System.currentTimeMillis());
sbContentDisp.append(DOT);
sbContentDisp.append(sFileType);
response.setHeader(HEADER_CONTENT_DISPOSITION_TAG, sbContentDisp.toString());
response.flushBuffer();
ServletOutputStream sosStream = response.getOutputStream();
sosStream.write(tableData.getBytes());

I am using Internet Explorer for opening the new xls in new Browser of Internet Explorer. But when the page is opening in the new Browser, I am getting the Exception "The page cannot be opened" since the Checkbox in the browser properties "Do not save encrypted pages to disk". Hence this is not being downloaded. Can anyone tell me how to avoid this since I have seen internet webpages downloading though this is checked in my browser.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to open new browser instance for opening a xls in Secure Mode