You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Sharma, Siddharth" <Si...@Staples.com> on 2004/10/09 00:02:36 UTC

How to insert a record in excel

I am reading an existing excel file, (in other words, treating it as a
template) and then inserting dynamic data in the template to generate the
final excel workbook.
The report is simple, in tabular form with summary totals at the end.
This summary row (at the bottom) has certain formatting and static text that
I wish to keep from the template. But I cannot seem to find any method in
HSSFSheet to insert a row rather than overwrite an existing one.
So when I iterate over my dynamic data set and create rows, it overwrites
the summary row at the bottom.
I can create the summary row via POI, but before I do that, I am wondering
if it's possible for that row to remain in the template.

Thanks
-Sid


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: How to insert a record in excel

Posted by Danny Mui <da...@muibros.com>.
i normally use the shiftrows functionality there.


Sharma, Siddharth wrote:
> I am reading an existing excel file, (in other words, treating it as a
> template) and then inserting dynamic data in the template to generate the
> final excel workbook.
> The report is simple, in tabular form with summary totals at the end.
> This summary row (at the bottom) has certain formatting and static text that
> I wish to keep from the template. But I cannot seem to find any method in
> HSSFSheet to insert a row rather than overwrite an existing one.
> So when I iterate over my dynamic data set and create rows, it overwrites
> the summary row at the bottom.
> I can create the summary row via POI, but before I do that, I am wondering
> if it's possible for that row to remain in the template.
> 
> Thanks
> -Sid
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org