poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MSB <markbrd...@tiscali.co.uk>
Subject Re: org.apache.poi - deprecated class Region
Date Wed, 16 Sep 2009 15:52:01 GMT

Sorry to say that you will not find that class or method in 3.2 final, both
were added as version 3,5 of the API was developed. Even though it has not
yet acquired the 'final' label - something that I understand is imminent -
version 3.5 is stable. Furthermore, it includes features that are missing
from version 3.2 - such as the getNumberOfCells() method - along with other
bug fixes and enhancements. As a result, I think it would be wise for you to
download and use the latest version of the API - that is assuming you are
able to make this decision of course. Nightly builds can be downloaded from
this address; http://encore.torchbox.com/poi-cvs-build/

If you have to stick with version 3.2 then all may not be lost. The
CellRangeAddress class includes other methods that could help you to
determine how many cells were in the region. For example if you called the
getLastColumn() and subtracted from the integer value that returns the value
returned by calling the getFirstColumn(), then you would know how many
columns there were in the area. Repeat that operation with the getLastRow()
and getFirstRow() methods and you will know how many rows there are in the
area. Multiplying these two numbers together (rows * columns) ought to tell
you how many cells there are in the area. I adnit this is a simplsitic first
step - it ignores the possibility of an embedded merged area for example -
but it could help you get a little closer to the answer.


Mark B

nut888 wrote:
> Just had a check with the javadoc and from what I can see, the Region
> classes
> getArea() method returned a count of the number of cells in the region.
> There is a similar method defined on the CelRangeAddressBase class - and
> inherited by CellRangeAddress when it extends this class - called
> getNumberOfCells(). Maybe this is what you are after, and you should be
> able
> to call that method on a CellRangeAddress object.
> Please tell me path to class CellRangeAddressBase
> For example
> #import  org.apache.poi.......CellRangeAddressBase
> I cannot find this class
> I cannot find method getNumberOfCells in documentation
> I found its in *.html files of poi-bin-3.2-FINAL-20081019.tar.gz archive
> in doc directory unsuccessfully
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org

View this message in context: http://www.nabble.com/org.apache.poi---deprecated-class-Region-tp25466349p25475306.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

View raw message