poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shailesh Ligade" <shailesh.lig...@defensesys.com>
Subject RE: adding a speadsheet
Date Thu, 29 May 2003 15:02:23 GMT
Thanks Ethan,

I don't have any problem doing this, but I have functions which are
returning just sheet (more than one) and now I need to create workbook
and add those sheets to it. That is where I have problem.


-----Original Message-----
From: Knepp, Ethan [mailto:eKnepp@c-cor.net] 
Sent: Thursday, May 29, 2003 10:35 AM
To: 'POI Users List'
Subject: RE: adding a speadsheet


Below is the order in which I create a new workbook and add a sheet to

// create the output stream for the workbook
FileOutputStream out = new FileOutputStream(ssLocation + ssName);

// create a new workbook
HSSFWorkbook wb = new HSSFWorkbook();

// create a new sheet
HSSFSheet sheet = wb.createSheet();

After you create the sheet you can add rows and cells to it.  

Check the following link for a good examples:

Hope this helps.

-----Original Message-----
From: Shailesh Ligade [mailto:shailesh.ligade@defensesys.com]
Sent: Thursday, May 29, 2003 10:31 AM
To: poi-user@jakarta.apache.org
Subject: adding a speadsheet

Hello All,

I need to create excel file with many sheet. One of my java class, will
call bunch of classes, each returning a sheet, and then calling calls
will create workbook and able to add all the sheets to it. Is this
possible using POI? I didn't see any API for doing this. Sheet
constructors are protected, and I didn't find any way to add sheet to
workbook passing a sheet.


View raw message