|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24147 Spreadsheet_Excel_Writer fails to parse simple formula
Submitted: 2003-06-12 07:07 UTC Modified: 2003-07-04 03:59 UTC
From: paul at classical dot com Assigned: xnoguer (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
13 + 39 = ?
Subscribe to this entry?

 [2003-06-12 07:07 UTC] paul at classical dot com
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' \

Reproduce code:
require_once 'Spreadsheet/Excel/Writer.php';

$workbook = new Spreadsheet_Excel_Writer();

$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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-04 03:59 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 14:03:38 2021 UTC