Documentation Jspreadsheet Api
The Jspreadsheet API is a PHP library to make it possible to publish actions from the backend to the spreadsheet interface and connect its data with any other application. With the API and Jspreadsheet Cloud you would be able to create amazing real-time solutions, such as:
- Real-time spreadsheet
- Transform simple spreadsheets in live database relational applications
- Data persistence and automatic backups
- Serverless spreadsheets
To use this API you should have a Jspreadsheet Cloud Account where you can generate your secret Access Key and create your online spreadsheets.
The Jspreadsheet Client API is available in PHP.
% composer install jspreadsheet/client
Account and Keys
To connect to your spreadsheet and data, you will need the API key and a spreadsheet identifier. The secret API key can be generated using your Jspreadsheet Account. With this key, you can perform any read and write actions to your spreadsheets and data, so it should be used wisely. Non authorized use of your key can create a lot of problems, so be cautious. You are responsible to keep it safe.
You can generate or regenerate your API key on your Jspreadsheet Profile Account.
Unique spreadsheet identifier
You can create a new spreadsheet from your workspace.
Create your first example
<?php require 'vendor/autoload.php'; use jspreadsheet\Jspreadsheet; // Connect to the API using your secret API key $client = new Jspreadsheet('ZzAsZzQ0YWI1MmMzZjQwZjQ4MmQ6YWM2Njg3MzgwZWVmNDVkdzExZjJlN1=='); // Get the spreadsheet / first worksheet by default $spreadsheet = $client->getSpreadsheet('f0a9d5c1-2106-4641-86b1-71c144f61255'); // Get the columns width - (Expected an array with the column width) $spreadsheet->getColumns()->getWidth(); // Result [40, 40, 45]