There is no pre-existing method that will allow you to do this. You will need
to write the code yourself.

The one wrinkle concerns whether the sheets are in differenet workbooks or
in the same workbook. If the sheets are in the same workbook, it is simply a
case of craeting a method that will copy over the cells value and any style
for you. On the other hand, if the sheets are in different workbooks, you
will not be able to simply copy the style but will have to clone it I am
afraid, but there is a method to support this in the CellStyle class; 

/"void cloneStyleFrom(CellStyle source)

    Clones all the style information from another CellStyle, onto this one.
This CellStyle will then have all the same properties as the source, but the
two may be edited independently. Any stylings on this CellStyle will be
lost! The source CellStyle could be from another Workbook if you like. This
allows you to copy styles from one Workbook to another. However, both of the
CellStyles will need to be of the same type (HSSFCellStyle or XSSFCellStyle)
"
/
Yours

Mark B

--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/How-to-copy-a-HSSFRow-of-a-HSSFSheet-and-insert-this-in-another-HSSFSheet-tp5710283p5710284.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to