Forum Discussion

Rocky_Brown's avatar
Rocky_Brown
Helper I
3 years ago

Sharepoint Upload

I have the following sample code to bring a sharepoint file into Power BI using M-Code - Power Query.  The code allows me to bring in 1 tab in the escel file.

 

Is there a way to bring in multiple tabs?

 

 

let

Source = SharePoint.Files("https://vyukaexcelu.sharepoint.com/", [ApiVersion = 15]),

Filter = Table.SelectRows(Source, each ([Name] = "sample.xlsx")), File = Filter{[Name="sample.xlsx",

#"Folder Path"="https://vyukaexcelu.sharepoint.com/shared_files/"]}[Content],

#"Imported Excel" = Excel.Workbook(File),

#"Sheet or table selection" = #"Imported Excel"{[Item="Sheet1",Kind="Sheet"]}[Data],

#"Promoted Headers" = Table.PromoteHeaders(#"Sheet or table selection", [PromoteAllScalars=true])

in

#"Promoted Headers"

 

Thank you,

1 Reply