#24147 [NEW]: Spreadsheet_Excel_Writer fails to parse simple formula

From: Date: Thu, 12 Jun 2003 12:07:05 +0000
Subject: #24147 [NEW]: Spreadsheet_Excel_Writer fails to parse simple formula
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17352@lists.php.net to get a copy of this message
From: paul at classical dot com Operating system: Linux PHP version: 4.3.1 PHP Bug Type: PEAR related Bug description: Spreadsheet_Excel_Writer fails to parse simple formula Description: ------------ Creating a spreadsheet with a simple formula like =A1*10 fails unless the formula contains a trailing space #php configuration './configure' \ '--enable-xml' \ '--enable-ftp' \ '--with-mysql=/usr' \ '--with-apache=../apache' \ '--with-zlib-dir=/usr/local' \ '--with-curl=/usr/local' \ '--with-jpeg-dir=/usr/local' \ '--with-png-dir=/usr/local' \ '--enable-track-vars' \ '--with-pspell=/usr/local' \ '--with-dom=/usr/local' \ '--enable-track-vars' \ '--with-msession' \ '--enable-pcntl' Reproduce code: --------------- <?php require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $workbook->send('test.xls'); $worksheet =& $workbook->addWorksheet('bug'); //data cell $worksheet->write(0, 0, 2); //simple formula, no trailing space - FAILURE $worksheet->write(1, 1, "this fails"); $worksheet->write(1, 2, "=A1*10"); //simple formula, with trailing space - SUCCESS $worksheet->write(2, 1, "this works"); $worksheet->write(2, 2, "=A1*10 "); //close and send sheet $workbook->close(); ?> Expected result: ---------------- expect formula =A1*10 in cell C2 of returned spreadsheet Actual result: -------------- cell C2 contains following text Sintactic error: *, lookahead: , current char: 3 -- Edit bug report at http://bugs.php.net/?id=24147&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24147&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24147&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24147&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24147&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24147&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24147&r=support Expected behavior: http://bugs.php.net/fix.php?id=24147&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24147&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24147&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24147&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24147&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24147&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24147&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24147&r=gnused

« previous php.pear.dev (#17352) next »