How to PHP export to Excel 2
How to use PHP to export excel file. export.php <? php // load library require 'php-excel.class.php' ; // create a simple 2-dimensional array $data = array ( 1 => array ( 'Name' , 'Surname' ), array ( 'Schwarz' , 'Oliver' ), array ( 'Test' , 'Peter' ) ); // generate file (constructor parameters are optional) $xls = new Excel_XML ( 'UTF-8' , false , 'My Test Sheet' ); $xls -> addArray ( $data ); $xls -> generateXML ( 'my-test' ); ?> php-excel.class.php <? php /** * Simple excel generating from PHP5 * * @package Utilities * @license http://www.opensource.org/licenses/mit-license.php * @author Oliver Schwarz <oliver.schwarz@gmail.com> * @version 1.0 */ /** * Generating excel documents on-the-fly from PHP5 * * Uses the excel XML-specification t...
留言
張貼留言