Forum Discussion
Magnus Vegem Dahle
Jun 20, 2018Brass Contributor
Power Query Source from Relative Paths
Hi All, I am making an analysis tool that uses two Excel file sources via Power Query. The tool work well, but as soon as the file and source files are moved to another location it stops working ...
- Jun 20, 2018
Hi Magnus,
You may find the current file path putting in any cell of your workbook the formula
=LEFT(CELL("filename",$A$1),FIND("[",CELL("filename",$A$1),1)-1)
name this cell somehow, let say "FilePath" and generate absolute path in query like
<prev step> FilePath = Excel.CurrentWorkbook(){[Name="FilePath"]}[Content]{0}[Column1], FullPathToFile1 = FilePath & "Name1.xlsx" <next step>
saadiriaz
May 20, 2020Copper Contributor
Hi All
My source doesn't end with null and true. Rather it looks like the below.
Source = Csv.Document(File.Contents("E:\PQ\testing\home.txt"),[Delimiter=" ", Columns=36, Encoding=1252, QuoteStyle=QuoteStyle.None]),
When I do all the steps mentioned above, I get an error "4 arguments were passed to a function which expects between 1 and 3."
Would appreciate the help.
Thanks!
- SergeiBaklanMay 21, 2020MVP
Which exactly steps do you do?