http://code.google.com/p/php-excel/ http://code.google.com/p/php-excel/wiki/QuickUsageGuide
Step 01: Just put the class-excel-xml.inc.php in your project directory and include it using (of course you may choose to put it wherever you like):
Código PHP:
require (dirname (__FILE__) . "/class-excel-xml.inc.php");
Step 02: For testing, create a two dimensional array:
Código PHP:
$myarray = array (
1 => array ("Oliver", "Peter", "Paul"),
array ("Marlene", "Mica", "Lina")
);
Step 03: Instanciate class and dump the array into the document.
Código PHP:
$xls = new Excel_XML;
$xls->addArray ( $myarray );
$xls->generateXML ( "testfile" );
The document (with filename "testfile") will be delivered to your browser for downloading. All values of the array will be defined as "string" - I may at support for more types later.