Forum Discussion
Akshit_Bansal
Jun 24, 2024Copper Contributor
Automate running of Power Query when new file is uploaded to Sharepoint
I have a SharePoint/OneDrive folder where every week I upload an excel file containing data in a fixed format. I have made power queries to do some transformations on the excel data and output the transformed data within that excel in a separate sheet. I also need to connect the excel data (before transformation) to Power BI to display graphs.
I want something which automatically detects that a new excel file has been uploaded to SharePoint/OneDrive, run the power queries on the data in the excel, and also create a connection to Power BI and display the graphs.
I tried using Power Automate but it has a limitation that it can't run power queries automatically on the excel file. PLEASE HELP me with a solution that can automate this process, I have been stuck for a week trying to find a way.
1 Reply
Sort By
- JKPieterseSilver Contributor
Akshit_Bansal If the queries can be refreshed using Excel on-line, you could have your PowerAutomate Flow call a script like this one:
function main(workbook: ExcelScript.Workbook) { // Refresh all data connections workbook.refreshAllDataConnections(); }