【发布时间】:2021-04-03 11:30:28
【问题描述】:
我正在寻找基于值的清除特定行内容/数据,然后隐藏行。
在 { F Col } 中键入值“Done” 清除 { E , C Col } 的值
当一切都完成后,隐藏行。
function ClearContentThenHideRow() {
var s = SpreadsheetApp.getActive().getSheetByName('Main');
s.showRows(1, s.getMaxRows());
s.getRange('F:F')
.getValues()
.forEach( function (r, i) {
if (r[0] == 'Done')
//sheet.getRange(["C:C","E:E"]).clearContent(); // clear content not working
s.hideRows(i + 1);
});
}
【问题讨论】:
标签: javascript google-apps-script google-sheets google-sheets-api spreadsheet