Introduction

Typical usage

<?php

require_once 'Spreadsheet/Excel/Writer.php';

// Creating a workbook

$workbook = new Spreadsheet_Excel_Writer();

// sending HTTP headers
$workbook->send('test.xls');

// Creating a worksheet
$worksheet =& $workbook->addWorksheet('My first worksheet');

// The actual data
$worksheet->write(00'Name');
$worksheet->write(01'Age');
$worksheet->write(10'John Smith');
$worksheet->write(1130);
$worksheet->write(20'Johann Schmidt');
$worksheet->write(2131);
$worksheet->write(30'Juan Herrera');
$worksheet->write(3132);

// Let's send the file
$workbook->close();
?>

Installation

Download OLE-1 (required package) from Doqnload OLE-1 to c:\Downloads\pear folder

Download Spreadsheet_Excel_Writer from Spreadsheet_Excel_Writer to c:\Downloads\pear folder

 

If pear fails to install due to Tar.php error, change:

$v_att_list = & func_get_args();
to
$v_att_list = func_get_args();
see: pear

 

Install OLE-1 (required package) from cmd window:

pear install c:\Downloads\pear\OLE-1.0.0RC3.tgz

Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in PEAR\PackageFile\v2\Validator.php on line 1933
PHP Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in C:\xampp\php\pear\PEAR\PackageFile\v2\Validator.php on line 1933

Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in C:\xampp\php\pear\PEAR\PackageFile\v2\Validator.php on line 1933
install ok: channel://pear.php.net/OLE-1.0.0RC3

Install Spreadsheet_Excel_Writer from cmd window:

pear install c:\Downloads\pear\Spreadsheet_Excel_Writer-0.9.4.tgz

Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in PEAR\PackageFile\v2\Validator.php on line 1933
PHP Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in C:\xampp\php\pear\PEAR\PackageFile\v2\Validator.php on line 1933

Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in C:\xampp\php\pear\PEAR\PackageFile\v2\Validator.php on line 1933
Package “pear.php.net/Spreadsheet_Excel_Writer” dependency “pear.php.net/OLE” has no releases
install ok: channel://pear.php.net/Spreadsheet_Excel_Writer-0.9.4