copy or clone a HSSFWorkbook

Posted by Fortega on Stack Overflow See other posts from Stack Overflow or by Fortega
Published on 2010-03-26T12:29:39Z Indexed on 2010/03/26 12:33 UTC
Read the original article Hit count: 339

Filed under:
|
|

Hi,

Currently I am doing the following in a loop (at least 300 times): - create a HSSFWorkbook from a template file - add some values to specific cells in the workbook - save the workbook as a new excel file

The first line takes about 70% of the time (reading excel file). What I would like to do is to take this out of the loop, and read the file only once. In the loop, I would like to copy or clone the template HSSFWorkbook.

However, I can't find anything about copying/cloning a HSSFWorkbook. Did some of you do this before? Any tips?

© Stack Overflow or respective owner

Related posts about java

Related posts about excel