
I have searched everywhere for examples but I can't find any that work. I need to write a function to interpolate thermodynamic data from a chart. All the data is entered into calc, but in order to read it I need to be able to write a function that uses the 'offset' function from the list of regular calc functions. I know that offset works, because it works when I just use it in a formula, but it won't work when I try to use it in a macro function. Strangly, the COS function works fine in a macro, but SQRT doesn't and neither does OFFSET.
I found some example macro functions that used these commands, but they seemed to have no effect on the operation of the macro function that I am trying to write:
dim service as object, sheet as object, cell as object
service = createUnoService( "com.sun.star.sheet.FunctionAccess" )
Please help