Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DebbieE
Community Champion
Community Champion

PQE M Code. Excel File in Standpoint. Adding worksheet into the Code -Avoid helper Queries

I have Excel Files in Sharepoint.

 

Previously when I loaded them into power BI I ended up with lots of Helper Queries

 

Helper Queries.png

Which obviously I dont want. So i changed the code

 

= SharePoint.Files(ParamSharepoint, [ApiVersion = 15])

 

I use a parameter for the Sharepoint address

 

= Table.SelectRows(Source, each Text.Contains([Folder Path], ParamFolder))

 

then another Paramter which holds the folder of the file

 

= Table.SelectRows(#"Filtered Rows1", each Text.Contains([Name], "FileA"))

 

Then I filter for the File(s)

 

= Table.SelectColumns(#"Filtered Rows",{"Content", "Name"})

 

Remove all the contents apart from Content(Which is binary) and The Name of the File

 

Table.Skip(Excel.Workbook([Content]){0}[Data])

 

Then I write a bit of code to add the content of the Excel Workbook (And I also skip the header here but I may not need to do that bit for this file

 

This works when there is one worksheet but now I want to go to a specific worksheet. Is there anyway i can change the above code to include Worksheet?

 

 

 

 

 

0 REPLIES 0

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.