You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by nicolas kakaridis <gr...@hotmail.com> on 2003/02/24 13:07:35 UTC

Help on the behavior of HSSFSheet.removeRow and how to insert a row

Hello,
  I have two question and I hope you'll have time to answer me...
  I am using POI 1.9.0

First
  I want to know if the behavior HSSFSheet.removeRow is "normal"

  Supposing I have a filled HSSFWorkbook...

  If I call
  HSSFSheet currentSheet.removeRow(0);
  This row is not removed but cleared from previous HSSFCells contained in 
that row.

  If it is "normal" it could be better to explain it on the javadoc, because 
I am expecting that the row at index 1 becomes row at index 0.


Secondly

  Is there a manner to insert an HSSFRow between existing rows on a
HSSFSheet :

  I have a row at index 0 and 1.
  Then I want to insert a row at index 1. The expeted result would be :
    - A row at index 0
    - A row at index 1 (the row inserted)
    - A row at index 2 (previously at index 1)

Thank you for your respons,

Nicolas

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


Re: Help on the behavior of HSSFSheet.removeRow and how to insert a row

Posted by "Andrew C. Oliver" <ac...@apache.org>.
I regard that as a bug.  It is not valid to have a row with no cells.

nicolas kakaridis wrote:

> Hello,
>  I have two question and I hope you'll have time to answer me...
>  I am using POI 1.9.0
>
> First
>  I want to know if the behavior HSSFSheet.removeRow is "normal"
>
>  Supposing I have a filled HSSFWorkbook...
>
>  If I call
>  HSSFSheet currentSheet.removeRow(0);
>  This row is not removed but cleared from previous HSSFCells contained 
> in that row.
>
>  If it is "normal" it could be better to explain it on the javadoc, 
> because I am expecting that the row at index 1 becomes row at index 0.
>
>
> Secondly
>
>  Is there a manner to insert an HSSFRow between existing rows on a
> HSSFSheet :
>
>  I have a row at index 0 and 1.
>  Then I want to insert a row at index 1. The expeted result would be :
>    - A row at index 0
>    - A row at index 1 (the row inserted)
>    - A row at index 2 (previously at index 1)
>
> Thank you for your respons,
>
> Nicolas
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>