Search code examples
javaexcelapache-poipoi-hssf

Copy and paste rows with HSSF (Apache POI)


Possible Duplicate:
How to insert a row between two rows in an existing excel with HSSF (Apache POI)

How can I copy the values and all the formatting of a row using HSSF. Using the MS Excel or other Spread Sheet application it is easy as copy and paste. But now I'm having problem copying a row with HSSF in Java.

My scenario right now, is I'm on the Cell:A46 and it is the last row of the table, but I still have many data to populate on the cell. I cannot simply just create a row and it cells, because I need also the formatting. And it may also break some of the formulas, because I use an excel template which have formatting after Cell:A46.


Solution

  • I did a similar post that have an answer which solve this problem.

    For the answer, just take a look on my other post here