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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors