I tried setCellNum() as your advice. It works, but for merged cells, it
doesn't shift at all.
Best regards,
Khanh. 

-----Original Message-----
From: Sergey Bondarenko [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 13, 2007 3:46 PM
To: POI Developers List
Subject: Re: Deleting column

I've just looked at shiftRows(..). It is more intellectual than simple
setRowNum(..) for all rows. But maybe it's enough for you to call
cell.setCellNum(..) for all cells at the left from removed cell.
Is it suitable for you ?

Best regards,
Sergey.

2007/3/13, Khanh Tran <[EMAIL PROTECTED]>:
> Sorry for posting twice a question.
> I delete/insert rows fine now. After deleting/inserting, I called 
> shiftRows to shift the affected rows. I am looking for the similar 
> method for column, ie, shiftCells...
> Best regards,
> Khanh
>
> -----Original Message-----
> From: Sergey Bondarenko [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 13, 2007 3:02 PM
> To: POI Developers List
> Subject: Re: Deleting column
>
> You right, it deletes row, but it does not shift other rows up.
> You can then shift them up by yourself using HSSFRow.setRowNum(int
> rowNum) for each row below removed.
>
> Best regards,
> Sergey Bondarenko.
>
> 2007/3/12, Khanh Tran <[EMAIL PROTECTED]>:
> > It just clean the row, not delete. When a row is deleted, all the 
> > following rows will be shift up.
> >
> > -----Original Message-----
> > From: Sergey Bondarenko [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 12, 2007 6:23 PM
> > To: POI Developers List
> > Subject: Re: Deleting column
> >
> > Hi!
> >
> > I think you can use HSSFSheet.removeRow(HSSFRow row) for rows removing.
> >
> > Best regards,
> > Sergey Bondarenko.
> >
> > 2007/3/12, Khanh Tran <[EMAIL PROTECTED]>:
> > > Dear experts,
> > > Is there any way to delete a column/row in Excel file using POI?
> > >
> > > Thanks.
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > - 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/
> > >
> > >
> >
> > --------------------------------------------------------------------
> > - 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/
> >
> >
> > --------------------------------------------------------------------
> > - 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/
> >
> >
>
> ---------------------------------------------------------------------
> 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/
>
>
> ---------------------------------------------------------------------
> 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/
>
>

---------------------------------------------------------------------
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/


---------------------------------------------------------------------
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/

Reply via email to