Hi,
I wonder if it is possible to clone a row or move a row from one sheet
to another?
I haven't found anything in the API(beside addRow() which is a private
Method in HSSFSheet) and with Google.
Backround is the following:
I use/load a predefined template, including merged cells etc.
I fill in text into the template. But sometimes I want to repeat a row.
So I shift all rows below down one row, and then it would be great to be
able to clone the UpperRow or get the row from another sheet. This
should include merged cells as well.
Up to now I merely copy the styles:
for (int j = 0; j < rowToCopy.getLastCellNum(); j++){
HSSFCell cellToCopy = rowToCopy.getCell((short)j);
HSSFCell newCell = newRow.createCell((short)j);
newCell.setCellStyle(cellToCopy.getCellStyle());
newCell.setCellType(cellToCopy.getCellType());
}
This misses the merged Regions.
Can anyone help? Is there a know workaround? Am I missing something?
Thanks a lot for your time and your help,
Karsten.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/