poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13265] - Could not generate Excel File. Having all ASCII characters.
Date Fri, 11 Aug 2006 15:34:35 GMT
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


virupatel@hotmail.com changed:

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




------- Additional Comments From virupatel@hotmail.com  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: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message