You can hide and show a column on the sheet, using the hideColumn method. It takes two parameters:
$$("ssheet").hideColumn(2, true, "Sheet1");
To insert a new column to the left of the specified one, use the insertColumn method. The method takes the ID of the column, before which a new column will be inserted as a parameter.
$$("ssheet").insertColumn(3);
If the column id isn't specified, a new column will be inserted before the selected one.
You can also delete a particular column or a range of columns by passing their id(s) to the deleteColumn method.
$$("ssheet").deleteColumn(3);
// or
$$("ssheet").deleteColumn([1, 3]);
Without the parameter, the method deletes the selected column.
It's possible to get the configuration object of a column by using the getColumn. You need to pass the column id as a parameter. You can also pass the name of the sheet as the second parameter, if needed.
var config = $$("ssheet").getColumn(5, "Sheet1");
The method returns the column's configuration object.
You can check the visibility of a column by using the isColumnVisible method. The method takes the id of a column as a parameter:
var isVisible = $$("ssheet").isColumnVisible(2);
The method returns true, if the column is visible and false if it's hidden.
You can hide and show a row in the sheet, using the hideRow method. It takes two parameters:
$$("ssheet").hideRow(2, true, "Sheet1");
To insert a new row above the specified one, use the insertRow method. The method takes the ID of the row, above which a new row will be inserted as a parameter.
$$("ssheet").insertRow(3);
If the row id isn't specified, a new row will be inserted above the selected one.
You can also delete a particular row or a range of rows by passing their id(s) to the deleteRow method.
$$("ssheet").deleteRow(3);
// or
$$("ssheet").deleteRow([1, 3]);
Without the parameter, the method deletes the selected row.
It's possible to get the data of a row by using the getRow. You need to pass the row id as a parameter. You can also pass the name of the sheet as the second parameter, if needed.
var data = $$("ssheet").getRow(5, "Sheet1");
The method returns an object with the row's data.
You can check the visibility of a row by using the isRowVisible method. The method takes the id of a column as a parameter:
var isVisible = $$("ssheet").isRowVisible(2);
The method returns true, if the row is visible and false if it's hidden.
You can "freeze" a column with data to make it always visible on the screen independently of horizontal scrolling.
To freeze columns, use the freezeColumns method. Columns are fixed starting from the very left one, so you should pass the amount of columns to freeze, starting from 0 (zero) as the firts parameter. You can also pass the name of the sheet as the second parameter, if needed:
$$("ssheet").freezeColumns(2, "Sheet1");
If invoked without the first parameter, the method will unfreeze the frozen columns, if any.
There is also a possibility to freeze rows, to make some of them remain at the very top of the sheet.
To freeze rows, apply the freezeRows method. As the first parameter you should pass the number of rows that should be frozen, starting from 0. You can also pass the name of the sheet as the second parameter, if needed:
$$("ssheet").freezeRows(3, "Sheet1");
Without the first parameter the method unfreezes the frozen rows, if there are any.
Back to top