使用getDirtyCells方法可以获取到所以被编辑的单元格,通过单元格的到编辑的行
- var dirtyCells = activeSheet.getDirtyCells();
- var len = dirtyCells.length;
- if (len > 0) {
- for (var i = 0; i < len; i++) {
- var cell = dirtyCells[i];
- alert("row:" + cell.row + " " + "col:" + cell.col + " " + "oldValue:" + cell.oldValue + " " + "newValue:" + cell.newValue);
- }
- }
- });
复制代码 |