locked
power query- not working with some web pages RRS feed

  • Question

  • On this webpage: http://www.nordpoolspot.com/Market-data1/Elspot/Capacities1/Market-coupling-capacities1/ALL/Hourly/?view=table

    The query ususally fails to find the main table, if it gets it the first time it usually dissapears after a while, or later when opening the spreadsheet an trying to refresh.

    Any way to fix this?



    Saturday, May 30, 2015 8:01 PM

Answers

  • Many web pages require JavaScript to load meaningful data. There's no reliable way of knowing when the JavaScript is "done" running in the browser, so we use heuristics to decide when to take a snapshot of the DOM. This is inherently troublesome, and there's not very much we can do about it.
    Monday, June 1, 2015 3:29 PM

All replies

  • Hi,

    maybe it has sth to do with the code generated by the web query wizard:

    let
        Source = Web.Page(Web.Contents("http://www.nordpoolspot.com/Market-data1/Elspot/Capacities1/Market-coupling-capacities1/ALL/Hourly/?view=table")),
        Data0 = Source{0}[Data],
        #"Changed Type" = Table.TransformColumnTypes(Data0,{{"", Int64.Type}, {"May 2015 Mon", Int64.Type}, {"May 2015 Tue", Int64.Type}, {"May 2015 Wed", Int64.Type}, {"May 2015 Thu", Int64.Type}, {"May 2015 Fri", Int64.Type}, {"May 2015 Sat", Int64.Type}, {"Sun", Int64.Type}})
    in
        #"Changed Type"

    Watch the 3rd step: every column has automatically been applied a format transformation. As the name of the columns will change over time, this string will return errors. So try if removing the step #"Changed Type" helps.


    Imke


    Monday, June 1, 2015 1:06 PM
  • OK,

    now I see - this query doesn't refresh after the first refresh (very strange).

    If I switch to edit-mode and then come back, it refreshes again, but only once.

    Sorry, no idea. Just a guess: Maybe it's the cookies, but haven't seen this behaviour before.

    Did you send a frown already?


    Imke


    Monday, June 1, 2015 1:20 PM
  • Many web pages require JavaScript to load meaningful data. There's no reliable way of knowing when the JavaScript is "done" running in the browser, so we use heuristics to decide when to take a snapshot of the DOM. This is inherently troublesome, and there's not very much we can do about it.
    Monday, June 1, 2015 3:29 PM
  • Ok, then I guess power query won't work with this webpage. Maybe I can try with some other sort of web scraping. thanks anyway:-)

    Wednesday, June 3, 2015 5:51 AM