Il 18/05/2010 19:00, Daniel Rentz ha scritto:
Hello,
Martin Dobiasch schrieb:
My problem is now to convert the Address Object back to a String
public String CSDRangeAddress(XCellRange range)
{
XCellRangeAddressable xAdd=
(XCellRangeAddressable)UnoRuntime.queryInterface(
XCellRangeAddressable.class, range);
CellRangeAddress address = xAdd.getRangeAddress();
//do something here like address.EndRow= 12;
return "...";
}
Is there an API-way to convert CellRangeAddress to a String?
You can use the "AbsoluteName" property of the range, but this will
return the sheet name too.
http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/SheetCellRange.html#AbsoluteName
There is also another way using the css.table.CellRangeAddressConversion
service
(and css.table.CellAddressConversion also)
example:
oSheet = ThisComponent.Sheets(0)
aAddr = oSheet.getCellRangeByName("A15:F36").RangeAddress
oCnv = _
ThisComponent.createInstance("com.sun.star.table.CellRangeAddressConversion")
oCnv.Address = aAddr
MsgBox oCnv.PersistentRepresentation
MsgBox oCnv.UserInterfaceRepresentation
ciao
Paolo M
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]