You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by dpront <ge...@xmarter.com> on 2011/09/01 12:55:08 UTC
cell current Range
Hi,
Is there a built-in functionality/method on Apache POI that can display
the current Cell Range? Actually I'm already starting to write this
functionality within my code, I just wanna ask if this is already
implemented.
For example:
InputStream inp = new FileInputStream(inputFile);
Workbook wb = WorkbookFactory.create(inp);
Sheet s = wb.getSheet(0);
Row r = s.getRow(0);
Cell c = r.getCell(0);
And now, since I'm at Row 0 and Cell 0, when I get its Cell Range or Cell
Address (not sure about the term), the result would be "A1".
Thanks.
Gerard
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/cell-current-Range-tp4757872p4757872.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: cell current Range
Posted by dpront <ge...@xmarter.com>.
Hi Yegor!
Thank you it worked perfectly!
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/cell-current-Range-tp4757872p4764661.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: cell current Range
Posted by Yegor Kozlov <ye...@dinom.ru>.
String address = new org.apache.poi.ss.util.CellRangeAddress(firstRow,
lastRow, firstCol, lastCol).formatAsString();
Yegor
On Thu, Sep 1, 2011 at 2:55 PM, dpront <ge...@xmarter.com> wrote:
> Hi,
>
> Is there a built-in functionality/method on Apache POI that can display
> the current Cell Range? Actually I'm already starting to write this
> functionality within my code, I just wanna ask if this is already
> implemented.
>
> For example:
>
> InputStream inp = new FileInputStream(inputFile);
> Workbook wb = WorkbookFactory.create(inp);
>
> Sheet s = wb.getSheet(0);
> Row r = s.getRow(0);
> Cell c = r.getCell(0);
>
> And now, since I'm at Row 0 and Cell 0, when I get its Cell Range or Cell
> Address (not sure about the term), the result would be "A1".
>
> Thanks.
> Gerard
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/cell-current-Range-tp4757872p4757872.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