How to transfer data in and out of macro

I would like to use “macro” in LibreOffice to do intensive computation. I have done this in MS Spreadsheet
successfully, using VBA. However, I am having difficulty writing them in Libre Basic. I spent quite sometime and
I have not been able to write a simple macro to get data from sheets, do the computations, and put them back in to the sheets. I looked around but I have not found a consistent information. Is there a “good” simple reference to this? especially an example?

Hi

This wiki page gives Information and resources for finding, creating, using and publishing macros in LibreOffice.

If you prefer a website to document the OpenOffice site is still relevant and it includes examples.

HTH. Regards