You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Filippo Balicchia <fi...@gmail.com> on 2008/05/12 15:26:07 UTC
shift sheet column
Hi all,
I have an excel sheet and I need to shift column A to column B.
Could you please suggest me a method to do this work ?
from the API point of view I don't see anything that help
Am I in wrong ?
Thanks for help.
Cheers.
--Filippo
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: shift sheet column
Posted by Andy Chien <hs...@utoronto.ca>.
I don't think POI has such functionality. POI works with the xls file
directly not the Excel application like VBA. The insert column function
you want done actually belongs to the functionality of the
_Excel_application_ not the xls file.
The only way I can see to do it in POI using usermodel is:
- Iterate through all the rows in valid range indicated by usermodel
HSSFSHEET.getLastRowNum() or use an iterator
- and create column B by HSSFROW.createCell(1) 1 for column B if I
remember correctly correct me if I'm wrong
- get value from column A and assign it to column B, this part you can
refer to example on POI website
hope this helps,
Andy
Filippo Balicchia wrote:
> Hi all,
>
> I have an excel sheet and I need to shift column A to column B.
> Could you please suggest me a method to do this work ?
>
> from the API point of view I don't see anything that help
> Am I in wrong ?
>
> Thanks for help.
>
> Cheers.
>
> --Filippo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org