Quantcast
Viewing all articles
Browse latest Browse all 217232

Using the current folder as a variable as the Import Folder for other files?

I would like to give a powerBI to someone else to use that does not have access to my folder.

I maintain a couple excel files that create input parameters for the subsequent table imports.

I would like to modify the import code of this excell file to be relative to the current folder the pbix file is in.

 

How do I do that?

ie

Convert 

    Source = Excel.Workbook(File.Contents("C:\Subfolder\Example\SitURLs.xlsx"), null, true),

to

 

    PV_Folder=MAGICPOWERQueryFunctionforcurrentpath()

    Source = Excel.Workbook(File.Contents(""& PV_Folder &"\SitURLs.xlsx"), null, true),

 

[edited for clarity?]


Viewing all articles
Browse latest Browse all 217232

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>