Power Query prepares the data, but someone still has to click “Refresh”. If the report is to be produced automatically and sent to the management board, you need a second component – and you need to know one of its limitations.
Office Scripts work in Excel for the web and in Excel for Microsoft 365 on the desktop. You record your actions, and Excel saves them as a script that can be run with a button or from Power Automate. Power Automate can run it, for example, every Monday at 7:00 and email the result.
The limitation is this: a script run by Power Automate does not refresh Power Query queries. According to Microsoft’s documentation, data refresh in such a flow works only for Power BI sources. The flow can therefore format and distribute data that is already in the file, or pull rows from tables in the branch files itself. A Power Query-based report that needs to refresh without human involvement is better moved to Power BI with scheduled refresh.
VBA macros – older programs stored in an Excel file – still work in desktop Excel. However, Microsoft blocks them by default in files from the internet and from emails, and they do not work in the browser. New automations are therefore better built on Office Scripts and Power Automate.
Power Automate for desktop is useful where data can only be extracted by clicking through an old program. Such a robot repeats a person’s actions, but it is sensitive to any change in the program’s appearance. Treat it as a last resort, not a first choice.