Internal Functions
This section covers methods that do not communicate with the intrasheets API.
Documentation
Section titled “Documentation”Methods
Section titled “Methods”| Method | Description |
|---|---|
| getSpreadsheetGuid | Get spreadsheet guid. Jspreadsheet getSpreadsheetGuid(): string; |
| getWorksheet | get a Jworksheet object referring to the worksheet at the given index. Jspreadsheet getWorksheet(worksheetIndex: number): IJworksheet; @param worksheetIndex - worksheet index. |
Examples
Section titled “Examples”Get Spreadsheet Guid
Section titled “Get Spreadsheet Guid”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 = '15eb1171-5a64-45bf-be96-f52b6125a045';
// Get the spreadsheet instanceconst spreadsheet = client.getSpreadsheet(guid);
// Get spreadsheet guidconsole.log(spreadsheet.getSpreadsheetGuid());Get Worksheet
Section titled “Get Worksheet”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 = '15eb1171-5a64-45bf-be96-f52b6125a045';
// Get the spreadsheet instanceconst spreadsheet = client.getSpreadsheet(guid);
// Get a Jworksheet object referring to the worksheet at index 0.const worksheet = spreadsheet.getWorksheet(0);
// Get the worksheet settings just to show one of the features of the Jworksheet objectworksheet.getConfig().then((config) => { console.log(config);});