You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by skrajath <ra...@continental-corporation.com> on 2011/10/11 04:13:10 UTC
XSSF: Row.getCell()
Hi,
I am using XSSF to access the .xlsx format. Extracting row data and cell
data is being done by
Row.getCell(1) // to get the first cell data.
Is there a way to access cells like
Row.getCell(A) or Row.getCell(AC).
This will be very helpfull for me to access columns.
Can any one tell me the way to do this?
Thanks in advance
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSF-Row-getCell-tp4890435p4890435.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: XSSF: Row.getCell()
Posted by skrajath <ra...@continental-corporation.com>.
Ok. Thank you very much Yegor.
Cheers
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSF-Row-getCell-tp4890435p4891157.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: XSSF: Row.getCell()
Posted by Yegor Kozlov <ye...@dinom.ru>.
On Tue, Oct 11, 2011 at 12:53 PM, skrajath
<ra...@continental-corporation.com> wrote:
> Hi Yegor ,
>
> Thanks a lot, it worked great.
> I have about 20 column to read Ex: M1, J1, AB1 etc
> Do I have to create reference to each of these or is there any other way to
> handle multiple column CellReferences.
>
You need to create a CellReference object per reference.
Yegor
> Thanks in advance
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSF-Row-getCell-tp4890435p4891128.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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
Re: XSSF: Row.getCell()
Posted by skrajath <ra...@continental-corporation.com>.
Hi Yegor ,
Thanks a lot, it worked great.
I have about 20 column to read Ex: M1, J1, AB1 etc
Do I have to create reference to each of these or is there any other way to
handle multiple column CellReferences.
Thanks in advance
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSF-Row-getCell-tp4890435p4891128.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: XSSF: Row.getCell()
Posted by Yegor Kozlov <ye...@dinom.ru>.
Use org.apache.poi.hssf.util.CellReference to convert string
representation of a cell ref to column and rows:
CellReference ref = new CellReference("AC1");
Cell cell = sheet.getRow(ref.getRow()).getCell(ref.getCol());
Yegor
On Tue, Oct 11, 2011 at 6:13 AM, skrajath
<ra...@continental-corporation.com> wrote:
> Hi,
>
> I am using XSSF to access the .xlsx format. Extracting row data and cell
> data is being done by
>
> Row.getCell(1) // to get the first cell data.
>
> Is there a way to access cells like
>
> Row.getCell(A) or Row.getCell(AC).
>
> This will be very helpfull for me to access columns.
> Can any one tell me the way to do this?
>
> Thanks in advance
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/XSSF-Row-getCell-tp4890435p4890435.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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