LibreOffice Calc Macro - how to capture selected ranges

I'm creating a macro in LibreOffice Calc and I need a way to select some non-consecutive cell ranges, and capture what those selected ranges are. For example, I want to select the ranges "A1:A10", "C5:C13", "H7: H9" and be able to capture these three strings, to be able to apply some action where I selected. I have created the macro below, to be able to make a" replace " in the selected cells, but it only works in a single interval. Thank any hint.

Https://pastebin.com/4BtGjuVc

Author: Paulo Luvisoto, 2018-10-16

2 answers

I managed to do. If anyone is interested, follow the implementation:

Https://pastebin.com/3EX0f2yA

 1
Author: Paulo Luvisoto, 2018-10-17 22:12:31

Calc does not select multliplas selections, make 3 macros. and connect them.

 0
Author: Gilberto Schiavinatto, 2018-10-16 21:21:32