andydtaylor
Active Member
- Joined
- Feb 15, 2007
- Messages
- 360
- Office Version
- 2016
Hi,
I need to reference several multi_GB external text files. However I want my work to be easily ported to another user's computer. So I thought I'd use a parametised query to read current path from a worksheet table generated using a vba macro.
However I seem to be hitting a restriction of some kind because I get the message:
"Formula.Firewall: Query 'SupplierInvoices_20160101_20161231' (step 'Promoted Headers') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination"
What is the right way to do this?
1. Generate parameter
2. Use parameter
Thanks,
Andy
I need to reference several multi_GB external text files. However I want my work to be easily ported to another user's computer. So I thought I'd use a parametised query to read current path from a worksheet table generated using a vba macro.
However I seem to be hitting a restriction of some kind because I get the message:
"Formula.Firewall: Query 'SupplierInvoices_20160101_20161231' (step 'Promoted Headers') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination"
What is the right way to do this?
1. Generate parameter
Code:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Current Directory", type text}}),
Current_Directory = #"Changed Type"{0}[Current Directory]
in
Current_Directory
2. Use parameter
Code:
let
Current_Directory = Get_Current_Directory,
Source = Csv.Document(Web.Contents(Current_Directory & "\" & "SupplierInvoices_20160101_20161231.csv"),[Delimiter="|", Columns=23, Encoding=1200, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
in
#"Promoted Headers"
Thanks,
Andy
Last edited: