PHP code example of quytvoday / htmlphpexcel
1. Go to this page and download the library: Download quytvoday/htmlphpexcel 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/ */
quytvoday / htmlphpexcel example snippets
= '<table><tr><th>Column A</th><th>Column B</th></tr><tr><td>Value A</td><td>Value B</td></tr></table>';
$htmlPhpExcel = new \Ticketpark\HtmlPhpExcel\HtmlPhpExcel($html);
// Create and output the excel file to the browser
$htmlPhpExcel->process()->output();
// Alternatively create the excel and save to a file
$htmlPhpExcel->process()->save('myFile.xlsx');
// or get the \PhpOffice\PhpSpreadsheet\Spreadsheet object to do further work with it
$phpExcelObject = $htmlPhpExcel->process()->getExcelObject();