Todos

Write documentation for usage of utf8EncodeValues() and utf8DecodeValues()

Installation

Add HtmlPhpExcel in your composer.json:

{
"require": {
"ticketpark/htmlphpexcel": "0.3.1"
}
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update ticketpark/htmlphpexcel

Simple example

<?php
require_once('../vendor/autoload.php');
$html = '<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.xls');
// or get the PHPExcel object to do further work with it
$phpExcelObject = $htmlPhpExcel->process()->getExcelObject();