Search code examples
google-sheetsweb-scrapinggoogle-sheets-formulagoogle-finance

Is Google spreadsheets =ImportHtml() done locally or on a Google server?


Immediate problem:

=ImportHtml("http://127.0.0.1/~themis/transactions.html";"table";1)

is placed into a cell. The page exists; I can open it in Chrome. My guess is that it's done remotely as the error is "the data could not be retrieved".

My original problem: I want this original page from google finance. However, that table is created by javascript; using that original URL fails because the table doesn't exist and ImportHtml doesn't execute javascript. So I open the page with Chrome's developer tools, copy the root DOM as HTML, and write it to the above transactions.html file. Hacky, but I don't need live data.

Any ideas on a solution to either the immediate or original problem?


Solution

  • You're correct, all the Google spreadsheet operations are done remotely.

    It does appear that you could use the ImportXML spreadsheet function along with the GoogleFinance Data API to get your transaction information into a spreadsheet.