Hi all,
I've started learning the functions within the Get & Transform Data tab of the Data ribbon. As such I created two named ranges ("FilePath" and "FileName") to import a file from which I've pieced together from different threads.
Though the below doesn't error out it's also not outputting to a sheet:
I actually have a few questions:
1. What is this reference Sheet1_Sheet
2. Can I use a named range to set which tab I import instead of hard keying it like this Item="Sheet1"
3. How do I tell the query to output the record set to a certain tab (say Sheet5)
4. Is correct to say "Power Query" or "Get & Transform Data"
Many thanks in advance.
Regards,
Robert
I've started learning the functions within the Get & Transform Data tab of the Data ribbon. As such I created two named ranges ("FilePath" and "FileName") to import a file from which I've pieced together from different threads.
Though the below doesn't error out it's also not outputting to a sheet:
VBA Code:
//Power Query: Load data using Named Ranges
let
FilePath = Excel.CurrentWorkbook(){[Name="FilePath"]}[Content]{0}[Column1],
FileName = Excel.CurrentWorkbook(){[Name="FileName"]}[Content]{0}[Column1],
Source = Excel.Workbook(File.Contents(FilePath & FileName), null, true),
Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Col A", Int64.Type}, {"Col B", Int64.Type}, {"Col C", Int64.Type}, {"Col D", Int64.Type}, {"Col E", Int64.Type}})
in
#"Changed Type"
I actually have a few questions:
1. What is this reference Sheet1_Sheet
2. Can I use a named range to set which tab I import instead of hard keying it like this Item="Sheet1"
3. How do I tell the query to output the record set to a certain tab (say Sheet5)
4. Is correct to say "Power Query" or "Get & Transform Data"
Many thanks in advance.
Regards,
Robert