Database Reference
In-Depth Information
Figure 7-25: Replace the hard-coded file path and file name with your dynamic parameters.
9. Click the Apply & Close button on the Home tab.
At this point, you can use the custom function on all the files in the target directory.
10. On the Power Query tab, choose From File ➜ From Folder to start a connection to the direc-
tory that contains all the Excel files.
11. In the From Folder dialog box, provide Power Query with the file path of the target directory.
The Query Editor window opens to show you a table similar to the one in Figure 7-26. This
table contains a record for each file in the chosen directory. The Folder Path and Name col-
umns supply the function with the needed FilePath and FileName parameters.
Figure 7-26: Create a new query using the From Folder connection type to retrieve a table of all the
files in the target directory.
Search WWH ::




Custom Search