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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors