Description:
------------
IF I try to insert NOW() or TODAY() as formula there is an error creating the excel.
Reproduce code:
---------------
<?php
require_once 'Spreadsheet/Excel/Writer.php';
$workbook = new Spreadsheet_Excel_Writer();
$worksheet =& $workbook->addWorksheet('Sheet1');
$workbook->send('test.xls');
$worksheet->writeFormula(0, 0, '=NOW()');
$workbook->close();
?>
Expected result:
----------------
The excel file with a cell with =NOW() as content
Actual result:
--------------
Notice: Undefined variable: result in C:\PHP\www\Spreadsheet\Excel\Writer\Parser.php on line 1643
Warning: Cannot modify header information - headers already sent by (output started at C:\PHP\www\Spreadsheet\Excel\Writer\Parser.php:1643) in C:\PHP\www\Spreadsheet\Excel\Writer.php on line 67
After several Warning lines there is some kind of excel file on the web page...
Warning: Cannot modify header information - headers already sent by (output started at C:\PHP\www\Spreadsheet\Excel\Writer\Parser.php:1643) in C:\PHP\www\Spreadsheet\Excel\Writer.php on line 71
ÐÏà¡±á ...

Comments

[2005-11-12 04:15 UTC] xnoguer at php dot net

This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.