Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
I created a Excel file that is getting data from another Excel file located in our shared folders. I want that when someone copy in a new file to that location (with same name) then my Excel file automatically updated PQ/Tables with the data from the new file.
How do I do that?
Solved! Go to Solution.
Hi, @KasperJ90
After my testing, this is done automatically.
When you copy a new file to replace the old file in the same path, and you click Refresh button in Excel, then it will automatically get the data from the new file.
Whether you are getting data from an Excel file or from a folder, make sure that the steps for getting data from a file are the same in PowerQuery, then when you replace the old file, the file path is the same and all the query steps are the same, you will automatically get the data from the new file after you click Refresh.
Result:
code:
let
Source = Excel.Workbook(File.Contents("C:\Users\Administrator\Desktop\Shared folder\file.xlsx"), null, true),
Table1_Table = Source{[Item="Table1",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Table1_Table,{{"Date", type date}, {"Value", Int64.Type}})
in
#"Changed Type"let
Source = Folder.Files("C:\Users\Administrator\Desktop\Shared folder"),
#"C:\Users\Administrator\Desktop\Shared folder\_file xlsx" = Source{[#"Folder Path"="C:\Users\Administrator\Desktop\Shared folder\",Name="file.xlsx"]}[Content],
#"Imported Excel Workbook" = Excel.Workbook(#"C:\Users\Administrator\Desktop\Shared folder\_file xlsx"),
Table1_Table = #"Imported Excel Workbook"{[Item="Table1",Kind="Table"]}[Data]
in
Table1_Table
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @KasperJ90
After my testing, this is done automatically.
When you copy a new file to replace the old file in the same path, and you click Refresh button in Excel, then it will automatically get the data from the new file.
Whether you are getting data from an Excel file or from a folder, make sure that the steps for getting data from a file are the same in PowerQuery, then when you replace the old file, the file path is the same and all the query steps are the same, you will automatically get the data from the new file after you click Refresh.
Result:
code:
let
Source = Excel.Workbook(File.Contents("C:\Users\Administrator\Desktop\Shared folder\file.xlsx"), null, true),
Table1_Table = Source{[Item="Table1",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Table1_Table,{{"Date", type date}, {"Value", Int64.Type}})
in
#"Changed Type"let
Source = Folder.Files("C:\Users\Administrator\Desktop\Shared folder"),
#"C:\Users\Administrator\Desktop\Shared folder\_file xlsx" = Source{[#"Folder Path"="C:\Users\Administrator\Desktop\Shared folder\",Name="file.xlsx"]}[Content],
#"Imported Excel Workbook" = Excel.Workbook(#"C:\Users\Administrator\Desktop\Shared folder\_file xlsx"),
Table1_Table = #"Imported Excel Workbook"{[Item="Table1",Kind="Table"]}[Data]
in
Table1_Table
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 4 | |
| 3 |