Help needed with implementing Table.PromoteHeaders

tbablue

Active Member
Joined
Apr 29, 2007
Messages
488
Office Version
  1. 365
Platform
  1. 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.
 

Attachments

  • PowerBI.png
    PowerBI.png
    49.6 KB · Views: 5

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Add a custom column and the formula should be:

Power Query:
Table.PromoteHeaders([Data])

and then delete the Data column and use the new custom column as your table.
 
Upvote 0
Solution
Wow.

I really appreciate you time and expertise. TY.

I'd have never thought to do that.

Marked as solved. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top