You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Easwar Thondikulam <ea...@yahoo.com> on 2004/02/23 22:54:07 UTC

Excel Files using POI/HSSF

I have a JSP that needs to display the data in Excel
format.

I have using the POI/HSSF classes and when the page is
served, the data is in a mode that is not legible.

I have used the ServletOuputStream and I have done the
foll.

response.setContentType("application/vnd.ms-excel");

response.setHeader("Content-disposition","attachment;
filename=file.xls");

ServletOutputStream sos = response.getOutputStream();
HSSFWorkbook wb = new HSSFWorkbook();
.
.
.
.

wb.write(sos);
sos.flush();
sos.close();

What should I do so that I am able to read the data?

Any help that you can provide is greatly appreciated.

Thanks and Regards.
Easwar

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


AW: Excel Files using POI/HSSF

Posted by "Dirk.Rost@appShare.de" <Di...@appshare.de>.
hi,
it should work without setHeader

> -----Ursprungliche Nachricht-----
> Von: Easwar Thondikulam [mailto:easwar_t@yahoo.com]
> Gesendet: Montag, 23. Februar 2004 22:54
> An: poi-user@jakarta.apache.org
> Betreff: Excel Files using POI/HSSF
> 
> 
> I have a JSP that needs to display the data in Excel
> format.
> 
> I have using the POI/HSSF classes and when the page is
> served, the data is in a mode that is not legible.
> 
> I have used the ServletOuputStream and I have done the
> foll.
> 
> response.setContentType("application/vnd.ms-excel");
> 
> response.setHeader("Content-disposition","attachment;
> filename=file.xls");
> 
> ServletOutputStream sos = response.getOutputStream();
> HSSFWorkbook wb = new HSSFWorkbook();
> .
> .
> .
> .
> 
> wb.write(sos);
> sos.flush();
> sos.close();
> 
> What should I do so that I am able to read the data?
> 
> Any help that you can provide is greatly appreciated.
> 
> Thanks and Regards.
> Easwar
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> http://antispam.yahoo.com/tools
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org