Skip to content

Getting started

The Intrasheets Client library simplifies building requests to the Intrasheets API.

Install the client from npm with the following command:

Terminal window
% npm install @intrasheets/client

To begin using the Client API, start with the Client class. This class allows you to create spreadsheets and access the Jspreadsheet object. The Jspreadsheet object, available in the Client API, is used to manipulate spreadsheets, while the Jworksheet object controls individual worksheets.

A basic example of creating a spreadsheet. For more details on the Client class and the createSpreadsheet method

import { Client } from "@intrasheets/client";
const client = new Client({
baseUrl: "[Server url]",
token: "[Your access token]",
});
const config = {
worksheets: [
{
worksheetName: 'firstWorksheet',
minDimensions: [10, 10]
}
]
}
client.createSpreadsheet(config).then((spreadsheet) => {
console.log('created');
});
<html>
<body>
<script src="@intrasheets/client"></script>
<script>
const createSpreadsheet = function() {
const client = new clientApi({
baseUrl: "[Server url]",
token: "[Your access token]",
});
const config = {
worksheets: [
{
worksheetName: 'firstWorksheet',
minDimensions: [10, 10]
}
]
}
client.createSpreadsheet(config).then((spreadsheet) => {
console.log('created');
});
}
createSpreadsheet();
</script>
</body>
</html>

More information about the Client Class.


The Client Class