Fwd: [PEAR] Spreadsheet_Excel_Writer New Line Problems on Windows
| From: | Jason Leidigh | Date: | Fri, 20 Feb 2004 16:46:07 +0000 |
| Subject: | Fwd: [PEAR] Spreadsheet_Excel_Writer New Line Problems on Windows | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10832@lists.php.net to get a copy of this message | ||
I have this in my sent folder and it has both windows and mac examples???
Begin forwarded message:
From: Jason Leidigh <jleidigh@fibertel.com.ar> Date: February 20, 2004 1:30:08 PM GMT-03:00 To: pear-general@lists.php.net Subject: Re: [PEAR] Spreadsheet_Excel_Writer New Line Problems on Windows Thanks here are the examples: <?php ini_set("include_path", $_SERVER['DOCUMENT_ROOT'] . '/lib;'. ini_get("include_path")); require_once 'Spreadsheet/Excel/Writer.php'; error_reporting(E_ALL); PEAR::setErrorHandling(PEAR_ERROR_DIE); //// We give the path to our file here $workbook = new Spreadsheet_Excel_Writer($_SERVER['DOCUMENT_ROOT'] . '\admin\test.xls'); // sending HTTP headers //$workbook->send('test.xls'); $worksheet =& $workbook->addWorksheet('My first worksheet'); $worksheet->write(0, 0, 'Name'); $worksheet->write(0, 1, 'Age'); $worksheet->write(1, 0, 'John Smith'); $worksheet->write(1, 1, 30); $worksheet->write(2, 0, 'Johann Schmidt'); $worksheet->write(2, 1, 31); $worksheet->write(3, 0, 'Juan Herrera'); $worksheet->write(3, 1, 32); // We still need to explicitly close the workbook $workbook->close(); echo("Done"); ?>
Attachment: [text/enriched]
Attachment: [application/vnd.ms-excel] Mac.xls
Attachment: [text/enriched]