Hi Holger, On Wednesday, 2007-08-29 18:16:55 +0200, Holger Walliser wrote:
> first of all I'm new to this group. I hope I'm not complete OT and I beg > > you to tell me if I do anything wrong in this group. Usually for API related questions the [EMAIL PROTECTED] mailing list is better suited. > Now - beginning the real quest - I want to write an Add-In-Function > taking a cell as Argument and returning another cell as result. Such a > function would be very needful for me as an auxilliaryfunction. My > problem is $subject - You could not have an argument of type cell (o.k. > it could be a cellRange but this is not really what I want) and you can > have in no way a returnvalue of type cell. Well, I think the table::XCellRange object _is_ what you want as a parameter if you want to obtain a cell object for further processing. And no, returning a "cell" is not possible. You could return a cell address string though that could be interpreted using the INDIRECT function, or some coordinates that could be used by the ADDRESS or OFFSET functions. > In a sheet - call it round5 - of my document there are the results of > the matches of the teams and the players of the teams in round 5 of the > tournament. In another sheet - lets say parameters - there is a cell > containing the name of my team. > Now I want to have a formula in the first cell of column G such that I > get the value I would get when evalResult would be used on the text one > line under and one column right of the cell where I found the name of my > > team. In the second cell of column G the referenced cell should be that > two lines under and one column right of the "teamNameCell". So I want to > > write Add-In-Functions - e.g. called getText and searchRelative - so > that I can use the formula > =evalResult(getText(searchRelative( parameters!$B$1, "searchRange", > "row(thisCell)", 1 ) > but then searchrelative must be able to return a cell as result!! I didn't dive into, but it looks like the entire task could be accomplished using built-in spreadsheet functions, such as VLOOKUP, HLOOKUP, MATCH, COLUMN, ROW, OFFSET, and maybe ADDRESS and INDIRECT. Try it out. If you encounter problems using the built-in functions contact the [EMAIL PROTECTED] respectively the German speaking [EMAIL PROTECTED] mailing list. Eike -- OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer. SunSign 0x87F8D412 : 2F58 5236 DB02 F335 8304 7D6C 65C9 F9B5 87F8 D412 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't send personal mail to this [EMAIL PROTECTED] account, which I use for mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] Thanks.
pgpDuuWGj5Lmk.pgp
Description: PGP signature
