Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 ? 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |