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
Anonymous
Not applicable

Power Query from web - importing table with subscript / superscript values

Greetings

 

Data URL: https://docs.microsoft.com/en-us/office365/servicedescriptions/office-online-service-description/off...

 

When importing this data from the web using Power Query, the superscript values are omitted from the data. See the example below, where "Yes" is the data imported successfully, and 1 is the superscript value associated with the data that is cut from the import.

 

Example: Yes1

 

This import must be automated, we cannot rely on copy/paste methods or any manual updates

 

Thanks in advance

 

-CJ

 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

It works fine here, but you may need to enable the new Web Table connector. When I connect to Table1 in the initial connect, the following code is created by Power Query (you can paste this in the Advanced Editor view of a blank query) and it shows the superscripts just fine.

 

 

let
    Source = Web.BrowserContents("https://docs.microsoft.com/en-us/office365/servicedescriptions/office-online-service-description/office-online-service-description"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR > :nth-child(1), MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR > :nth-child(1)"}, {"Column2", "MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR > :nth-child(2), MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR > :nth-child(2)"}, {"Column3", "MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR > :nth-child(3), MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR > :nth-child(3)"}}, [RowSelector="MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR, MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR"]),
    #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}})
in
    #"Changed Type"

 

 

20200121 11_34_34-Options.png

 

20200121 11_37_31-Untitled - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Super User
Super User

It works fine here, but you may need to enable the new Web Table connector. When I connect to Table1 in the initial connect, the following code is created by Power Query (you can paste this in the Advanced Editor view of a blank query) and it shows the superscripts just fine.

 

 

let
    Source = Web.BrowserContents("https://docs.microsoft.com/en-us/office365/servicedescriptions/office-online-service-description/office-online-service-description"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR > :nth-child(1), MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR > :nth-child(1)"}, {"Column2", "MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR > :nth-child(2), MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR > :nth-child(2)"}, {"Column3", "MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR > :nth-child(3), MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR > :nth-child(3)"}}, [RowSelector="MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > TR, MAIN[id='main'] > DIV.table-scroll-wrapper:nth-child(11) > TABLE:nth-child(1) > * > TR"]),
    #"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}})
in
    #"Changed Type"

 

 

20200121 11_34_34-Options.png

 

20200121 11_37_31-Untitled - Power Query Editor.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

This solved the issue - thank you!

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.

Top Solution Authors
Top Kudoed Authors