2

starting my journey as a data analyst. I am trying to web scrape a table off of Transferwise (Wise's) price comparison website. I tried to:

  • Copy and paste URL into cell A1 in Google Sheets
  • Inspect the table row on the website
  • Copy and paste full Xpath into cell A2 in Google Sheets
  • Write formula: =importxml(A1,A2)
  • Get error

Inspecting table row on Wise price comparison website

Google Sheets error

Does IMPORTXML generally not work if the website uses an API to populate the table? The tables do seem different for those on Wikipedia for example.

BigBen
  • 46,229
  • 7
  • 24
  • 40
dm66
  • 21
  • 2

1 Answers1

3

It is not possible to retrieve informations by importxml since the page is built by javascript on client side, not server side. What you are lokking for is in fact a script!

<script>
          (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s);
            js.id = id;
            js.src = "https://widgets.wise.com/widgets.js";
            fjs.parentNode.insertBefore(js, fjs);
          }(document, "script", "transferwise-wjs"));
</script>

see other comments here https://webapps.stackexchange.com/questions/115664/how-to-know-if-google-sheets-importdata-importfeed-importhtml-or-importxml-fun

Mike Steelson
  • 14,650
  • 2
  • 5
  • 20