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

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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