1. Go to this page and download the library: Download ikkez/f3-sheet 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/ */
ikkez / f3-sheet example snippets
$excel = \Sheet::instance();
// data array
$rows = [
[
"name" => "rose",
"color" => "red",
"num" => 15
],
[
"name" => "daisy",
"color" => "yellow",
"num" => 25,
],
[
"name" => "orchid",
"color" => "purple",
"num" => 7
]
];
// header array to rename the field labels and sort/reorder the data array
$headers = ['name'=>'Name', 'num'=>'Number', 'color'=>'Flower Color'];
$excel->renderXLS($rows,$headers,"flowers.xls");