Power Query Relative Paths

Описание к видео Power Query Relative Paths

14th Sep 20 update - Recently some people have been having issues when using this method after an update means OneDrive 'defaults' to the online file not your local file.
Here's how to fix this:
   • Relative Paths in Power Query   OneDrive  

This video shows how to set up to use relative paths in Power Query, similar to the 'ThisWorkbook.Path' feature in VBA.
If you are able to use a spare worksheet on the workbook to put the path in a cell and then use Defined Names to assign it to a variable.
If you prefer to use VBA then you can have a 'Workbook.Open' event that assigns 'ThisWorkbook.Path & File or Folder to a Defined Name, and then refer to the Name as described in this video.
I have used both for customers, but neither is a particularly 'clean' solution.
The ideal would be to have an Excel.CurrentWorkbook() 'Path' property that could be used directly in the M code

Комментарии

Информация по комментариям в разработке