March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I am hoping to get a list of site pages hosted within a SharePoint Online site. The pages are listed as .aspx files within the site's page library folder:
I tried using the following 'SharePoint Folder' connector which returns all files within the document libraries (word, excel, pdf files) but does not return the site pages from the page library.
Source = SharePoint.Files("url", [ApiVersion = 15])
So my question is:
Can Power BI report on .aspx files within a page libary? And if so, how?
Thanks in advance!!
Solved! Go to Solution.
@TeigeGao is technically correct, there is not specific connector that will give you the ASPX files specifically. But that’s only half answering the question.
If you use the “SharePoint Online List” connector, you’ll get a list of all of the items in that site. Some of those entries will be the ASPX sites. There is also an item in that list called “Site Pages” which may also contain what you are looking for.
The below code, adding your URL in, will give you a good start. As time goes on the filter line might require tweaking depending on what changes Microsoft makes, or if you need those elements.
let Source = SharePoint.Tables("https://<YourSite>", [ApiVersion = 15]), #"Filtered Rows" = Table.SelectRows(Source, each ([Title] <> "appdata" and [Title] <> "appfiles" and [Title] <> "Form Templates" and [Title] <> "List Template Gallery" and [Title] <> "Master Page Gallery" and [Title] <> "Site Assets" and [Title] <> "Solution Gallery" and [Title] <> "Style Library" and [Title] <> "TaxonomyHiddenList" and [Title] <> "Theme Gallery" and [Title] <> "Web Part Gallery")) in #"Filtered Rows"
@TeigeGao is technically correct, there is not specific connector that will give you the ASPX files specifically. But that’s only half answering the question.
If you use the “SharePoint Online List” connector, you’ll get a list of all of the items in that site. Some of those entries will be the ASPX sites. There is also an item in that list called “Site Pages” which may also contain what you are looking for.
The below code, adding your URL in, will give you a good start. As time goes on the filter line might require tweaking depending on what changes Microsoft makes, or if you need those elements.
let Source = SharePoint.Tables("https://<YourSite>", [ApiVersion = 15]), #"Filtered Rows" = Table.SelectRows(Source, each ([Title] <> "appdata" and [Title] <> "appfiles" and [Title] <> "Form Templates" and [Title] <> "List Template Gallery" and [Title] <> "Master Page Gallery" and [Title] <> "Site Assets" and [Title] <> "Solution Gallery" and [Title] <> "Style Library" and [Title] <> "TaxonomyHiddenList" and [Title] <> "Theme Gallery" and [Title] <> "Web Part Gallery")) in #"Filtered Rows"
Thanks - just to confirm, I assume you meant that this data source is not available ? 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |