Forum Discussion
Simon_29
Helper II
3 years agoDynamic path to the folder with the excel files that I combine together in Power Query
Hello, I can create a dynamic path to a folder and a selected file in Power Query. I can change FileSource and FilePath dynamically. However, this time I load multiple excel files from one fold...
Anonymous
3 years agoNot applicable
Hi Simon_29 - yes this is possible. Please try the following as it will create to string values that can be combined into replace the path and folder string in your example:
- Create a worksheet called "INPUT"
- In Cell A1 type "Enter Path:" and in A2 type "Enter Folder:"
- In Cell B1 type in the path value, and in B2 type in the folder value
- Use the Named Range features in Excel to call cell B1 "Input_Path", and cell B2 "Input_folder"
- Select B1 and use the "From Table/Range" to add "Input_Path" into Power Query
- The trick is to add "{0}[Column1]" to the function to show the path and folder strings
let
Source = Excel.CurrentWorkbook(){[Name="Input_Path"]}[Content]{0}[Column1]
in
Source