PHP code example of fengxw / awesome-export-excel
1. Go to this page and download the library: Download fengxw/awesome-export-excel 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/ */
fengxw / awesome-export-excel example snippets
// define the arguments.
$header = 'It is a header';
$title = ['column1', 'column2'];
$data = [['value1', 'value2']];
// export excel
ExportExcel::getInstance()->export($header, $title, $data);