To Paste Formulas with Macro in LibreOfffice

Hello!

I work about copy-past in macro and I copy-past data but I want to add formulas in these cells.

I want to add formulas with macro because I have many cells and I’ll add them different formulas as you predict thanks to for loop.

In addition I want to add table border. How can I do them? Can you help me about it?

I searched them but I couldn’t find as I want.

Thanks for your help

Best Regard