How to use inbuilt calc functions while writing Libre Office Macros?

I want to use several inbuilt functions and write several Lines of Codes surrounding that.

Sheet 1 has data copied into it which updates on daily basis.

Sheet 2 searches for data and copies it.

Next day, the updated values are taken and posted separately.

I know excel functions to enable this. I just want to write Libreoffice Macros using them.

One such function is Index - Match

I have currencies which update on daily basis in Sheet 1.

Suppose I want to see the value of ABD in terms of USD as on 1st July 2017. I will use Index - Match to find the value. Entering that in cell A1 on Sheet 2.

Tomorrow, the value will change.

Index - Match will search and get the value as on tomorrow. This will be put in Cell A2 of Sheet 2.

On monthly basis, I wish to extract appropriate charts which could be used to get the trend.

Kindly advise how to proceed.

You need to create a FunctionAccess object (service) and to call its callFunction method.
Start reading Subchapter 6.28 of the “Useful Macro Information” by Andrew Pitonyak, e.g.

By the way: What do you expect INDEX(Sheet1.data, MATCH("ABD", Sheet1.data,0)) to return? Supposing ‘data’ is a named expression (1D-range), the MATCH part will return the index of the first (if any) occurrence of the search string “ABD” in the range - and an NA-error otherwise. The INDEX part will thus return “ABD” if found and the NA-error otherwise. Is this actually what you want?

Also: You cannot use named expressions in this way inside “macros”.

Hi

Yes, I need something like this. Please enlighten