How to freeze more than 5 columns in Google Spreadsheet

We have already seen the usage of freeze rows in Always keep headers visible in Google Spreadsheet. The maximum number of rows that Google Spreadsheet allows you to freeze using the menu option is 10 and similarly the maximum columns allowed is 5. In case you want to freeze more than 5 columns or 10 rows then you can try using Google App Script.

freeze more than 5 columns

function freezeColumns() {
  var aSheet = SpreadsheetApp.getActiveSheet().setFrozenColumns(8);
}

free more than 10 rows

function freezeColumns() {
  var aSheet = SpreadsheetApp.getActiveSheet().setFrozenRows(12);
}

And if you want remove the freeze rows or column then set the value to 0.

In Category: Technical

Ravi Shankar

A Software developer and blogger who is always looking to provide technical help to the wider community.

Show 2 Comments
  • Max November 7, 2012, 4:22 pm

    Thanks.. Help me a lot!!!

  • Max November 7, 2012, 4:22 pm

    Thanks.. Help me a lot!!!

Leave a Comment

Get your free copies of the following tech guides by joining the Digital Answers mailing list.