升级表后脚本中的错误

时间:2015-08-13 10:41:33

标签: google-apps-script

表更新后,执行期间发生错误:rang.sort。这是完整的tex程序。

function myFunction () {
    var ss = SpreadsheetApp.getActiveSpreadsheet ()
    var range = ss.getSheets () [ 0 ] .getRange ("O2: O");
        range.sort ({column: 15 , ascending: false})
} ;

错误:抱歉,发生了服务器错误。请稍后再试 。所以每次......

1 个答案:

答案 0 :(得分:0)

     {
     "_index" : "my_first_index",
     "_type" : "Node",
      "_id" : "20",
      "_version" : 1,
      "found" : true,
      "_source":{
      "_id": 20,
      "name": "Current file 21",
      "content":                         

         "QXJjaGl0ZWN0aW5nIEFwcGxpY2F0aW9ucyBmb3IgdGhlIFJ
         lYWwgV29ybGQgaW4gLk5FVAydCAtIERlc2lnbiBQYXR0ZXJucyBPbi1SYW",
      "originalNodeID": 0,
      "versionNo": 1,  "isLatest": true,
      "path": "C:\\Lucene\\sample\\extensible software downloads.txt"
  }
  }

或者使用getSheetByID或getSheetByName或getSheets()。next(),我不认为getSheets()[0]有效。