I am attempting to import the leaderboard at pgatour.com/leaderboard.html or golf.com/leaderboard (sorry, can't post more than 2 links since I have <10 reputation).
Based on my research, it seems that the IMPORTHTML & IMPORTXML functions are unable to retrieve the data because the table doesn't actually exist at the time the import function runs, as the table/data is loaded via javascript after the function reads the page's html/xml. Example:
=IMPORTXML("http://www.golf.com/leaderboard","//*[@id='leaderboardPositionTable']")
=IMPORTHTML("http://www.pgatour.com/leaderboard.html","table",1)
Is anyone aware of a way to pull such a table into a Google Docs spreadsheet? I tried to follow the advice here, but honestly don't have a clue if importing JSON is the right approach, or if I'm even doing it correctly.
Any help would be much appreciated. Thanks
After looking into this, I think you should take the following approach. It turns out that leaderboard is available as a JSON file. I wrote a function to test out the import and it works well.
Having gotten that far, the only thing left to do is write that information onto the spreadsheet.