DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=13265>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=13265


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED




------- Additional Comments From [EMAIL PROTECTED]  2006-08-11 15:34 -------
(In reply to comment #4)
> Created an attachment (id=3347)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=3347&action=view) 
[edit]
> Sample of what is generated

I came across the same problem and found that response buffer needs to be 
cleared before writing HSSF output to the console.

This problem seems to be only with BEA Weblogic and the code works fine with 
other servers. The sample code is attached below.

try{
        OutputStream fOut = response.getOutputStream();
        
        response.reset();                                               
        response.setContentType("application/vnd.ms-excel");
        response.setHeader("Content-Disposition","inline;filename=report.xls");
                
        workbook.write(fOut);
                                                        
        fOut.flush();
        fOut.close();                           
}catch(Exception e){
        System.out.println("Error Occured");
}

Hope that helps.
Thanks
Viral Patel

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

Reply via email to