SpreadJS Documentation
Setting Fixed or Frozen Rows and Columns
SpreadJS Documentation > Sample Code > Sample Code for Rows and Columns > Setting Fixed or Frozen Rows and Columns

You can freeze columns and rows.

Using Code

This example freezes two columns and two rows.

JavaScript
Copy Code
$(document).ready(function () {
    var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
    var activeSheet = spread.getActiveSheet();

// Fix 2 columns from left and 2 rows from top.
activeSheet.frozenRowCount(2);
activeSheet.frozenColumnCount(2);
activeSheet.getRange(0, -1, 2, -1).backColor("LightCyan");
activeSheet.getRange(-1, 0, -1, 2).backColor("LightCyan");
  });
See Also

Developer's Guide