Optimize Google Script for Hiding Columns

后端 未结 2 1786
慢半拍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);
    }
    
    0 讨论(0)
  • 2021-01-22 08:56

    unfortunately hiding columns is a "spreadsheet only" function, no way to make it faster or in batch...

    maybe you could imagine a custom UI (built with UiApp or HTMLService) to show only the user relevant data ? but that might not be possible, depending on how much you need spreadsheet specific features..., not speaking of the work it might represent.

    0 讨论(0)
提交回复
热议问题