Get details of cells changed from a Google Spreadsheet change notification in a machine readable format

前端 未结 1 731
渐次进展
渐次进展 2020-12-17 04:04

If I have a Google Spreadsheet e.g.

https://docs.google.com/spreadsheet/ccc?key=0AjAdgux-AqYvdE01Ni1pSTJuZm5YVkJIbl9hZ21PN2c&usp=sharing

And I have set u

1条回答
  •  盖世英雄少女心
    2020-12-17 04:46

    You could build a function that checks for changes. One way to do this is by comparing multiple instances of the same spreadsheet. If there are differences, you could email yourself. Using the time driven trigger, you can check every minute, hour, day, or week (depending on your needs).

    var sheet = **whatever**;//The spreadsheet where you will be making changes
    var range = **whatever**;//The range that you will be checking for changes
    var compSheet = **whatever**;//The sheet that you will compare with for changes
    function checkMatch(){
      var myCurrent = sheet.getRange(range).getValues();
      var myComparison = compSheet.getRange(range).getvalues();
      if(myCurrent == myComparison){//Checks to see if there are any differences
        for(i=0;i

    Then from Resources>Current project's triggers you can set checkMatch to run every minute.

    Also check out https://developers.google.com/gdata/samples/spreadsheet_sample for pulling data as json

    0 讨论(0)
提交回复
热议问题