I’ve just learned how to use LO Calc’s ability to import a ‘range’ from a LO Base query. I’ve got lots of queries in a LO Base database/registered datasource, appearing in varous sheets in a quite large LO Calc workbook. At present, I have to click into each range and then go to Data → Refresh Range. There doesn’t seem to be a “refresh all ranges” button.
I’d like to make such functionality in a macro.
I have seen examples like
ThisComponent.store()
oRange = ThisComponent.DatabaseRanges.getByName(“Import1”)
oRange.refresh()
However, I would prefer not to have to explicitly reference each range by name and refresh in sequence as there are a lot and I may indeed add more ranges/queries in due course. Is there a way to programatically ‘get’ all ranges (eg into an array) and then cycle through them to refresh them? Any sample macro code would be appreciated.