Forum Discussion

FreemanZ's avatar
FreemanZ
Super User
3 years ago
Solved

How to bulk change the source location for queries from different files in the same folder?

How to change the source location for queries from different files in the same folder?   Supposing I have 10 Excel files of different dimentions in one folder. Someday, I rename the folder or I move ...
  • FreemanZ's avatar
    FreemanZ
    3 years ago

    Thank you Jorge. I found this article works and solves the problem.

    https://powerbi.tips/2016/08/using-variables-for-file-locations/

     

    Adding the back slash at the end of the copied file path saves my day. Preciely the line below:

    = Excel.Workbook(  File.Contents(   Folder  &   "2000 Medals.xlsx") ,   null , true )

    Thank you Jorge to give me the hint and confidence working in this direction.