Getting-started
Currently on Beta version.
The Intrasheets Client is a NodeJS library to help you build requests to the Intrasheets API.
Known limitations: Worksheet, Columns nad Rows operations does not update any references. For example, if a column is added, any formula, validation, definedNames won't be updated on version 1. That will be included in the next version.
Client Settings
Section titled “Client Settings”| Property | Description |
|---|---|
| options?: object | Object creation options. |
| options.token?: string | Authentication token used in most requests. |
| options.baseUrl?: string | The API server URL. If this property is not informed, the environment variable 'JSPREADSHEET_API_BASE_URL' will be used. If this is also not set, the default value 'https://jspreadsheet.com/api' will be used. |
Installation
Section titled “Installation”You can install from the NPM as below:
% npm install @intrasheets/clientConfigure your API server
Section titled “Configure your API server”The API server will be running on your servers. Now you need to define the URL for the server.
Examples
Section titled “Examples”A basic example to configure the server and retrieve some basic information from the spreadsheet.
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);
spreadsheet.getWidth().then((result) => { // Result { // '0': 40, // '1': 40, // '3': 45, // } console.log(result);});