google spreadsheet - Service error: onEdit script -
I have an original edit script which will be automatically added to the column Runs to Sort. This script was working fine for several weeks but till last 10/31/14, I have been getting service errors. I am unable to determine the reason. Any ideas will be highly appreciated below code.
/ ** * Automatically 6 columns (not header row) Increasing ascending * / edit on function (event) {var sa = SpreadsheetApp.getActiveSpreadsheet (); Var sn = sa.getActiveSheet (); Var editedCell = sn.getActiveCell (); Var columnartia = 6; Var Tablerange = "A2: I 200"; // How to sort if If (editedCell.getColumn () == columnToSortBy) {var range = sn.getRange (tableRange); Range.sort ({column: columnToSortBy, ascending: true}}; }}
I have tested your code and it worked fine. You can check out the Google Apps Script Dashboard , see the reference.
You can use onEdit (e) , although see the code I have created.
Edit the code
function (e) {var sh = e.source.getActiveSheet (); Var editedCell = sh.getActiveCell (). GetColumn (); If (editedCell == 6) {sh.getRange ("A2: I200"). Sort ({column: edited, climbing: true}); }}
Comments
Post a Comment