PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #1780

Cell text truncated with strlen > 255

Details

Submitted2004-07-02 23:32 UTC
Fromgary at isohunt dot com
StatusBogus
PackageSpreadsheet_Excel_Writer
PHP Version5.0.0RC3 (Release Candidate 3)
OSWindows 2000
Roadmaps(Not assigned)

Comments

[2004-07-02 23:32 UTC] gary at isohunt dot com

Description:
------------
Any cell with text length > 255 characters gets truncated. Likely due to OLE datatypes.

Reproduce code:
---------------
<?
$xls =& new Spreadsheet_Excel_Writer('Merged.xls');
$sheetWrite =& $xls->addWorksheet('Merged Sheet');
$sheetWrite->write(0, 0, str_repeat('abc', 200));
$xls->close();
?>

Expected result:
----------------
Excel file Meged.xls with 1 cell of 600 characters.

Actual result:
--------------
1 cell of 256 characters.

[2004-07-16 23:55 UTC] xnoguer at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

Spreadsheet_Excel_Writer produces files compatible with Excel versions older than Excel 97. These older formats don't support more than 255 chars in a cell. If you want to write more than 255 chars, use the experimental method:
$xls->setVersion(8);