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?