Search code examples
xmlimportgoogle-sheetsparse-error

Google spreadsheet: Imported XML content cannot be parsed


Trying to scrape a soccer results site for my spreadsheet I use:

=IMPORTXML("http://www.flashscore.com/match/Ov7BcLEp","//*[@id='flashscore']/tbody/tr[1]/td[3]/span[1]/text()")

This works perfectly fine from within the google console in Chrome:

$x("//*[@id='flashscore']/tbody/tr[1]/td[3]/span[1]/text()")

However, it fails when I paste the above into a cell on a google spreadsheet.

Any ideas are appreciated. Thanks!


Solution

  • This is a bug on the new spreadsheet. See here https://stackoverflow.com/a/22031389/457557 Try it on an old google spreadsheet and it should work !