1. Go to this page and download the library: Download spiriitlabs/excel-rust library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Spiriit\Rustsheet\Attributes\AsExcelRust;
#[AsExcelRust(name: 'my_super_excel')] // override name is optionnal
class MyExcel implements ExcelInterface
{
...
}
class MyController
{
public function __invoke(ExcelRust $excelRust)
{
$output = $excelRust->generateExcelFromAvro('MyExcel', __DIR__.'/myexcel_avro.xlsx');
}
}