Optimize Google Script for Hiding Columns

后端 未结 2 1815
慢半拍i
慢半拍i 2021-01-22 08:15

These two scripts are incredibly slow. I work with a data set of about 32 columns by 1000 rows ( growing pretty rapidly ).

I\'ve read and even used code for treating dat

2条回答
  •  滥情空心
    2021-01-22 08:40

    For the ShowColumns() script, are you just needing to unhide all columns in the sheet? If so, you could at least simplify that one a bit:

    function ShowColumns() {
      var ss = SpreadsheetApp.getActiveSpreadsheet();
      var sheet = ss.getActiveSheet();
      var range = sheet.getRange("1:1");
      sheet.unhideColumn(range);
    }
    

提交回复
热议问题