Forum Discussion
mkuzner
May 25, 2025Copper Contributor
Website Power query connection
Hello everyone, I have a challenges where I want to import data from a website using Power Query for daily refreshing (data refreshes every day at 1pm). Although, when I try to connect to it, the...
Jun 04, 2025
What I can see power query do suggest you a table name Tabular Data, may I know what version of excel are you using. however below is the M code
let
Source = Web.BrowserContents("https://www.bsp-southpool.com/day-ahead-trading-results-si.html"),
#"Extracted Table From Html" = Html.Table(Source, {{"Column1", "TABLE:nth-child(2) > * > TR > :nth-child(1)"}, {"Column2", "TABLE:nth-child(2) > * > TR > :nth-child(2)"}, {"Column3", "TABLE:nth-child(2) > * > TR > :nth-child(3)"}}, [RowSelector="TABLE:nth-child(2) > * > TR"]),
#"Promoted Headers" = Table.PromoteHeaders(#"Extracted Table From Html", [PromoteAllScalars=true])
in
#"Promoted Headers"
If this resolves your query don't forget Mark as Solution.
- mkuznerJun 06, 2025Copper Contributor
I can see the suggested table Tabular data (using Microsoft 365 btw.), but the problem is that when I load it, it appears as an empty table. And if you visit the actual website, it is not empty at all, but filled with 24-hour data, and that is the actual data I am trying to import to Excel spreadsheet.
- SergeiBaklanJun 06, 2025Diamond Contributor
Afraid Power Query won't help. Body of the table is not in HTML directly, thus nothing to parse. If to check html body is generated by some function. That's all what Power Query see:
<h2> Tabular data </h2> <table> <thead><tr> <th scope="col" class="first"> Hour </th> <th scope="col"> Volume </th> <th scope="col" class="last"> Price </th> </tr></thead> <tbody id="results-table-da-tbody"></tbody> </table> <script>document.addEventListener('DOMContentLoaded',function(event) { if(!BSPCharts.table.da.INITIALIZED) { BSPCharts.table.da.hDate=document.getElementById('auction-chart-date'); BSPCharts.table.da.hTableBody=document.getElementById('results-table-da-tbody'); setTimeout(function(){BSPCharts.table.da.init()},1500) } } )</script>