Count sheets

Here is how to count sheets.

The following tip is used in this post. If you want to know them, please look through the following post.

Get objects of all sheets

 

Source code

function countSheets(){
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheets = ss.getSheets();
  var cnt = sheets.length;
  Browser.msgBox("How many sheets?: " + cnt);
}

 

Format

SheetsObjects.length

 

Returns

integer

1 thought on “Count sheets”

Leave a Comment