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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
hausbi
New Member

Web.BrowserContents cannot convert the value

I am getting below error after this = Web.BrowserContents("https://tradingeconomics.com/commodities") site connection. I couldn't find a solution. Can anyone help me?

hausbi_0-1728475578459.png

 

4 REPLIES 4
Anonymous
Not applicable

Hi @hausbi 

Did the solution @lbendlin  offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to, or you can provide more informaiton , then can help you.

 

Best Regards!

Yolo Zhu

PwerQueryKees
Super User
Super User

Web.BrowserContens takes an URL and produces the web HTML as text.

Cannot convert to table does not appaer as an internal error to me.

Can you share the M code please? Are you also using a Html.Table call? Like @lbendlin ?

lbendlin
Super User
Super User

Cannot reproduce.

 

 

let
    Source = Web.BrowserContents("https://tradingeconomics.com/commodities"),
    #"Extracted Table From Html" = Html.Table(Source, {{"Column1", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(1)"}, {"Column2", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(2)"}, {"Column3", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(3)"}, {"Column4", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(4)"}, {"Column5", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(5)"}, {"Column6", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(6)"}, {"Column7", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(7)"}, {"Column8", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(8)"}, {"Column9", "DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR > :nth-child(9)"}}, [RowSelector="DIV:nth-child(8) > DIV.card > TABLE.table-1720360255.table.table-hover.table-striped.table-heatmap > * > TR"]),
    #"Promoted Headers" = Table.PromoteHeaders(#"Extracted Table From Html", [PromoteAllScalars=true])
in
    #"Promoted Headers"

lbendlin_0-1728486071909.png

 

 

Nice

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors