Hi there,
I have two Excel named ranges each of which are only a single cell:
SrcFile (this contains the full path of the workbook that has the data I want to import), and
SrcSheet (this contains the sheet name from within SrcFile workbook I want to import)
I want to import the data from SrcSheet using Power Query and have come up with the following (I'm still learning so it may not be the most efficient way):
But it just lists the sheets in the external workbook. What I am missing to return the actual data?
Any advice would be greatly appreciated.
Many thanks,
Robert
I have two Excel named ranges each of which are only a single cell:
SrcFile (this contains the full path of the workbook that has the data I want to import), and
SrcSheet (this contains the sheet name from within SrcFile workbook I want to import)
I want to import the data from SrcSheet using Power Query and have come up with the following (I'm still learning so it may not be the most efficient way):
Power Query:
let
strFullPath = Excel.CurrentWorkbook(){[Name="SrcFile]}[Content]{0}[Column1],
strSheet = Excel.CurrentWorkbook(){[Name="SrcSheet]}[Content]{0}[Column1],
Source = Excel.Workbook(File.Contents(strFullPath)),
strSheetToQuery = Source{[Item=strSheet, Kind="Sheet"]}[Data]
in
Source
But it just lists the sheets in the external workbook. What I am missing to return the actual data?
Any advice would be greatly appreciated.
Many thanks,
Robert
Last edited by a moderator: