Spreadsheet footers
Footers is readonly data that goes in the footer of the spreadsheet. It can provides summary information to the user, and can include text or formulas.
Documentation
Section titled “Documentation”Methods
Section titled “Methods”The following methods are available to interact with the spreadsheet footers programmatically.
| Method | Description |
|---|---|
| getFooters | Get the footers definitions for a spreadsheet. `Jspreadsheet getFooters(): Promise<(string |
| setFooters | Remove the current footer and apply the informed one. @param footer - new footer data. `Jspreadsheet setFooters(footer: (string |
| resetFooter | Remove the footer. Jspreadsheet resetFooter(): Promise<void> DELETE /api/:guid/footers |
| setFooterValue | Change the value of a preexisting cell in the footer. @param x - cell column to be changed. @param y - cell row to be changed. @param value - new cell value. Jspreadsheet setFooterValue(x: number, y: number, value: string): Promise<void> POST /api/:guid/footers/value |
Examples
Section titled “Examples”Set the spreadsheet footers
Section titled “Set the spreadsheet footers”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);
// New footerconst rows = [ ['1', '2'], ['3', '4'],];
// Create the footers from the arrayspreadsheet.setFooters(rows).then(() => { // It worked correctly}).catch((err) => { // Something went wrong console.log(err);});Retrieving all footers
Section titled “Retrieving all footers”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 the footersspreadsheet.getFooters().then((footer) => { console.log(footer);});
// [["1","2"],["3","4"]]Set the value of a footer cell
Section titled “Set the value of a footer cell”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);
// Set the value of the footer cellspreadsheet.setFooterValue(1, 1, "New Value").then(() => { // It worked correctly}).catch((err) => { // Something went wrong console.log(err);});Delete all footers
Section titled “Delete all footers”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);
// Delete the footer definitionsspreadsheet.resetFooter().then(() => { // It worked correctly}).catch((err) => { // Something went wrong console.log(err);});