Installation

Overview

Install Aspose.Cells FOSS for PHP directly from the repository and require its bundled autoload.php.


Prerequisites

RequirementDetail
PHP8.1 or later
Extensionszip, dom, simplexml, mbstring
LicenseMIT License

Step 1: Get the Library

git clone https://github.com/aspose-cells-foss/Aspose.Cells-FOSS-for-PHP.git
cd Aspose.Cells-FOSS-for-PHP
composer install

Step 2: Require the Autoloader

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

Step 3: Verify the Installation

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

use Aspose\Cells_FOSS\Workbook;

$workbook = new Workbook();
$sheet = $workbook->Worksheets[0];
$sheet->Cells['A1']->PutValue('It works');
$workbook->Save('verify.xlsx');

echo 'Aspose.Cells FOSS for PHP installed and working.' . PHP_EOL;

Run it with php verify.php. A verify.xlsx file should appear in the working directory.


Next Steps

See Also