tbablue
Active Member
- Joined
- Apr 29, 2007
- Messages
- 488
- Office Version
- 365
- Platform
- Windows
Hi Forum,
The following script imports from a SharePoint location and filters on the files that I need.
let
Source = SharePoint.Files("https://xyz.sharepoint.com/sites/P3M/", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Folder Path], "Automated Reports")),
Custom1 = Table.TransformColumns(#"Filtered Rows", {"Content", each Excel.Workbook(_, true)}),
#"Expanded Content" = Table.ExpandTableColumn(Custom1, "Content", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Name.1", "Data", "Item", "Kind", "Hidden"}),
#"Filtered Rows1" = Table.SelectRows(#"Expanded Content", each [Name.1] = "data")
in
#"Filtered Rows1"
It gives me results as per the screen shot.
My tables are viewable via [Data] - but as can be seen in the screen shot, the first rows in each table need to be promoted to field headers - and I can't work out how to implement that.
Can anyone help?
Thanks in advance.
The following script imports from a SharePoint location and filters on the files that I need.
let
Source = SharePoint.Files("https://xyz.sharepoint.com/sites/P3M/", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Folder Path], "Automated Reports")),
Custom1 = Table.TransformColumns(#"Filtered Rows", {"Content", each Excel.Workbook(_, true)}),
#"Expanded Content" = Table.ExpandTableColumn(Custom1, "Content", {"Name", "Data", "Item", "Kind", "Hidden"}, {"Name.1", "Data", "Item", "Kind", "Hidden"}),
#"Filtered Rows1" = Table.SelectRows(#"Expanded Content", each [Name.1] = "data")
in
#"Filtered Rows1"
It gives me results as per the screen shot.
My tables are viewable via [Data] - but as can be seen in the screen shot, the first rows in each table need to be promoted to field headers - and I can't work out how to implement that.
Can anyone help?
Thanks in advance.