PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #8323

setNumFormat Ignored

Details

Submitted2006-07-30 05:33 UTC
From20060106 at ausbdm dot org
Assignedprogi1984
StatusBogus
PackageSpreadsheet_Excel_Writer
PHP Version4.3.11
OSLinux
Roadmaps(Not assigned)

Comments

[2006-07-30 05:33 UTC] 20060106 at ausbdm dot org

Description:
------------
I want to format a particular column as text, as opposed to general.

I tried the following, where 9 should correspond to the text cell format, but I guess there's a problem in the module itself, as it is still formatted as general.

Re. bug #3514: this appears related but distinct in that my understanding is that setNumFormat should take an integer corresponding to a particular cell format.

Test script:
---------------
$date_format =& $workbook->addFormat();
$date_format->setNumFormat(9);
$worksheet->setColumn(3,3,12,$date_format);

Expected result:
----------------
The third column should be formatted as type text (9).

Actual result:
--------------
The third column is formatted as type general (0).

[2006-08-31 19:43 UTC] wizard at roborooter dot com

the string for text "@" also doesn't work, oddly enough the number I found for text is 49, it doesn't work either.

http://sc.openoffice.org/excelfileformat.pdf page 160 (section 6.45)