Hi Pivithuru,

On Friday, 2010-08-06 14:01:31 +0530, Pivithuru Wijegunawardana wrote:

> I need to get the individual cells inside a cell range. But I need to do
> this without giving its x and y positions. Is there any method I could get a
> XCell list from a cell range? I am doing this in java.

You can query the XCellRangeAddressable interface and with that use
getRangeAddress() to obtain the CellRangeAddress and calculate the
dimensions
(nCols=cra.EndColumn-cra.StartColumn+1,nRows=cra.EndRow-cra.StartRow+1)
and then loop over all cells of the XCellRange from (0,0) < (nCols,nRows)
using getCellByPosition()

See
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Absolute_Address

  Eike

-- 
 OOo Calc core developer. Number formatter stricken i18n transpositionizer.
 Signature key 0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Oracle: http://blogs.sun.com/GullFOSS
 --
 Please don't send mail to the old e...@sun.com account that I used for mailing
 lists, it will phase out shortly. Use eike.rat...@oracle.com instead. Thanks.

Attachment: pgpy9RPwwVPwR.pgp
Description: PGP signature

Reply via email to