Freeze rows
This section covers the methods to handle with the spreadsheet freeze rows.
Documentation
Section titled “Documentation”Methods
Section titled “Methods”The following methods are available to interact with the spreadsheet freeze programmatically.
| Method | Description |
|---|---|
| getFreezeRows | Get the current value of the freezeRows property. `Jspreadsheet getFreezeRows(): Promise<number |
| setFreezeRows | Set the value of the freezeRows property. @param row - new value. Jspreadsheet setFreezeRows(row: number): Promise<void> POST /api/:guid/freeze/rows |
Examples
Section titled “Examples”Update the freeze rows configuration
Section titled “Update the freeze rows configuration”import { Client } from "@intrasheets/client";
// Create a new clientconst client = new Client({ // API Server baseUrl: "http://localhost:8009/api", // Your authentication token token: "eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i",});
// Spreadsheet Guidconst guid = '79b45919-c751-4e2b-a49a-6c1286e2fc03';
// Get the spreadsheet instanceconst spreadsheet = client.getSpreadsheet(guid);
// Freeze two rowsspreadsheet.setFreezeRows(2).then(() => { // It worked correctly}).catch((err) => { // Something went wrong console.log(err);});Get the freeze rows configuration
Section titled “Get the freeze rows configuration”import { Client } from "@intrasheets/client";
// Create a new clientconst client = new Client({ // API Server baseUrl: "http://localhost:8009/api", // Your authentication token token: "eyJhbGciOiJIUzUxMiIsInR5cCJ9.eyJkb21haW4iOiJsb2NhbGhvc3Q6ODAPQSJ9.Xr2Ir2-zEc_tqV5y6i",});
// Spreadsheet Guidconst guid = '79b45919-c751-4e2b-a49a-6c1286e2fc03';
// Get the spreadsheet instanceconst spreadsheet = client.getSpreadsheet(guid);
// Get freeze rowsspreadsheet.getFreezeRows().then((freezeRows) => { console.log(freezeRows);});