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

Be 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

Reply
DanielaHo
Frequent Visitor

Get .aspx files (site pages) from SPO page library

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:

Capture2.PNG

 

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!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@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"

 

View solution in original post

3 REPLIES 3
TeigeGao
Solution Sage
Solution Sage

HI @DanielaHo ,

This data source is still not unavailable in PowerBI.

Best Regards,

Teige

Anonymous
Not applicable

@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 ? 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.