Gert Groenhoff wrote:
Hi,
a user defined name of a cell range is unique on all sheets. but I can't
find a way to get this range from a different sheet. The only method I
know is getCellRangeByName(), but this works only with the correct
sheet. How can I get the range if I only know the name? Can anyone help?
Thank you.
Gert
oNames = ThisComponent.NamedRanges
oNamed = oNames.getByName("FOO")
oRg = oNamed.getReferredCells() returns Null from ambiguous references
(relative ones or multiple ones).
In this particular case:
oSh = ThisComponent.Sheets.getByame("XSheet")
oRange = oSh.getCellRangeByName("FOO")
For relative references you need to calculate the position from a cell's
address and the named range's pseudo-property ReferencePosistion (as far
as I know).
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]