Jexcel Api

Footers

Footers is the piece of readonly data that goes in the footer of the spreadsheet. It can be used to give a summary information, including formulas. A footer working example can be found here.

Set the spreadsheet footers

<?php
require 'vendor/autoload.php';

use jexcel\Jexcel;

// Create the jexcel instance
$client = new Jexcel('ZzAsMzQ0YWI1MmMzZjQwZjQ4MmQ6YWM2Njg3MzgwZWVmNDVkYzExZjJlN1==');

// Get the spreadsheet instance
$spreadsheet = $client->getSpreadsheet('946f23e8-ecd5-459c-b377-cc0c93200457');

$rows = [
    ['1', '2'],
    ['3', 4]
];

// Result
print_r($spreadsheet->setFooters($rows));

// { "success": 1, "message": "Updated" }

Retrieving all footers

<?php
require 'vendor/autoload.php';

use jexcel\Jexcel;

// Create the jexcel instance
$client = new Jexcel('ZzAsMzQ0YWI1MmMzZjQwZjQ4MmQ6YWM2Njg3MzgwZWVmNDVkYzExZjJlN1==');

// Get the spreadsheet instance
$spreadsheet = $client->getSpreadsheet('946f23e8-ecd5-459c-b377-cc0c93200457');

// Result
print_r($spreadsheet->getFooters());

// [["1","2"],["3","4"]]

Delete all footers

<?php
require 'vendor/autoload.php';

use jexcel\Jexcel;

// Create the jexcel instance
$client = new Jexcel('ZzAsMzQ0YWI1MmMzZjQwZjQ4MmQ6YWM2Njg3MzgwZWVmNDVkYzExZjJlN1==');

// Get the spreadsheet instance
$spreadsheet = $client->getSpreadsheet('946f23e8-ecd5-459c-b377-cc0c93200457');

// Result
print_r($spreadsheet->resetFooters());

// {"success":1,"message":"Updated"}