You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Umaa Rebbapragada <Um...@cnet.com> on 2003/10/13 23:09:19 UTC

copying a sheet from one workbook to another

Hi there,

I've been using the 1.10-dev release for an application I'm writing.  Have looked through the message archive and doesn't look like my question has been addressed before.

I have a new to create a workbook C which is a synthesis of workbooks A and B.  The only way I can see to do this now is to create a new HSSFWorkbook C which is a duplicate of A.  Then create new worksheets in C and iterate through B, copy over the cell values and styles from B into C on a cell by cell basis.

Just wondering if I overlooked a simpler way to accomplish this?  Or I'm stuck iterating through cells and copy over values/styles?

The reason I'm looking for a different way is that HSSF can read things like hyperlinks, but can't write them out specifically.  However, I've had no problems with HSSF reading and writing workbooks with hyperlinks when I didn't specifically touch the cells.  I was hoping something approximating a copySheet function would provide the same benefit.

Thanks much,
Umaa

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