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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
woolf
Frequent Visitor

Web.BrowserContents - Expression.Error: We cannot convert the value type "Table" to type "Text"

Hi, 

 

I tried to use the steps from the youtube example link. With the direct link it works, but change it from direct link to the table I get the error Expression.Error: We cannot convert the value type "Table" to type "Text". 

table.PNG

Code: 

 

 

let
    Quelle = Web.BrowserContents(URLs),
    #"Aus HTML-Code extrahierte Tabelle" = Html.Table(Quelle, {
{"Bez.", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(1)"},
{"2026e", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(2)"},
{"2025e", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(3)"},
{"2024e", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(4)"},
{"2023", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(5)"},
{"2022", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(6)"},
{"2021", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(7)"},
{"2020", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(8)"},
{"2019", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(9)"},
{"2018", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(10)"},
{"2017", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(11)"},
{"2016", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(12)"},
{"2015", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(13)"},
{"2014", "DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR > :nth-child(14)"}},
[RowSelector="DIV.ov-carousel.ov-carousel\-\-table-fixed-cells.ov-snapshot-fundamental-1.outer-spacing\-\-large-top > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE.table.ov-table.ov-table\-\-fixed-x-cells.outer-spacing\-\-none-top.text-size\-\-small > * > TR"]),
    #"Höher gestufte Header" = Table.PromoteHeaders(#"Aus HTML-Code extrahierte Tabelle", [PromoteAllScalars=true])
in
    #"Höher gestufte Header"

 

 

Thx in advance.

 

./Florian

3 REPLIES 3
Anonymous
Not applicable

Hi,

Thanks for the solution rajendraongole1  offered and i want to offer some more information for user to refer to.

hello @woolf , based on your description, based on the error information, please check the #"Aus HTML-Code extrahierte Tabelle" step, you can refer to the following similar thread. 

ssbipolar.com

Solved: "Cannot convert a value of type Table to type Text... - Microsoft Fabric Community

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rajendraongole1
Super User
Super User

Hi @woolf - The error "Expression.Error: We cannot convert the value type 'Table' to type 'Text'" usually occurs in Power Query when you try to use a table as if it were a text value. 

 

try the below example:

let
Quelle = Web.BrowserContents("https://example.com"),
ExtractedTable = Html.Table(Quelle, {
{"Bez.", "DIV.ov-carousel > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE > * > TR > :nth-child(1)"},
{"2026e", "DIV.ov-carousel > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE > * > TR > :nth-child(2)"}
}, [RowSelector="DIV.ov-carousel > DIV.ov-carousel__wrapper > DIV.ov-carousel__inner > TABLE > * > TR"]),
ConvertedToText = Table.TransformColumnTypes(ExtractedTable,{{"Bez.", type text}, {"2026e", type text}})
in
ConvertedToText

 

Replace https://example.com with your actual URL and adjust the HTML selectors as necessary. This should help resolve issues related to data type conversion and HTML extraction complexities.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Unfortunately it didn't solve my problem to go automaticlly through all the links in the table and provide me all datas for the links ☹️

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors