On Tue, 27 Sep 2011, fsicher wrote:
I've two XSSFWorkbooks: *a* and *b*. For some reason I want to copy one or
more Sheets from *a* into *b*. My solution is, that I create (one or more)
XSSFSheet(s) in *b* and copy rows and cells (iterator) from corresponding
*a*-Sheet into *b*-Sheet.
Ist it possible to copy the *a*-Sheet as an whole Object?
Alas not, as not all the things a sheet references are actually stored at
the sheet level. Some parts are workbook wide. Thus, if you copied just
the sheet parts, it wouldn't work as you'd be missing things (or worse
referencing the wrong things!)
The only safe way is to iterate over the rows and cells, and copy over
styles and names as you spot new ones
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]