Thanks for your help Niklas
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?

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Gesendet: Dienstag, 18. Mai 2010 14:28
An: [email protected]
Betreff: Re: [api-dev] Range/Cell Address as Parameter for calc addin

On 05/18/10 12:53, Martin Dobiasch wrote:
> I want to write a function with a rangeaddress as parameter.
> Is there a way to do this with java?
> The function should be part of an extension. (Which is written in java)
> 
> The function does something like that:
> Public Function CSDRangeAddress(arg As Range) As String
>     CSDRangeAddress = arg.Address
> End Function

An add-in function (see 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets
/Spreadsheet_Add-Ins) 
can have a parameter of type XCellRange. The passed object is then a 
SheetCellRange implementation, which you can query for the 
XCellRangeAddressable interface.

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to