The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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 ?
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"
Nice