Quantcast
Channel: ImportXML with Google Sheet and Auto Refresh Every Minute - Stack Overflow
Viewing all articles
Browse latest Browse all 2

ImportXML with Google Sheet and Auto Refresh Every Minute

$
0
0

I have the script below which is importing some XML data in a google sheet called prices. Everything works fine except that I have set up a time driven trigger to run every minute but the data won't get updated.

  • The trigger seems to work fine, as I can see the last run time being updated every minute.
  • The script calling the XML data works fine as I can see the data being populated in the spreadsheet.
  • The XML feed works fine too, as I can see the time being updated every minute, also have a cron job.
  • I only have this function as a project.

    function getData() {  var sheetName = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("prices");  var queryString = Math.random();  var cellFunction = '=ImportXML("http://myxmldata.com/data-xml.php","//data/date")';  sheetName.getRange('A2').setValue(cellFunction);} 

    So what's wrong?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images