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 #5347

using writeNote() causes excel crash

Details

Submitted2005-09-09 09:39 UTC
Frompatrick dot douret at edf dot fr
StatusAnalyzed
PackageSpreadsheet_Excel_Writer
PHP Version4.3.3
OSWindows 2000 Professionnal
Roadmaps(Not assigned)

Comments

[2005-09-09 09:39 UTC] patrick dot douret at edf dot fr

Description:
------------
I need to create an excel sheet in which I would like to add notes for some cells.

So I am using the function writeNote.
When opening the xls document, excel crashes.

My version are:
PHP 4.3.3
EXCEL 2000 SR1 (FRENCH)
Spreadsheet_Excel_Writer-0.8
OLE-0.5

Test script:
---------------
<?php
require_once('php/v1_1/classes/Excel/pear/Worksheet.php');
require_once('php/v1_1/classes/Excel/pear/Workbook.php');

$fname = tempnam("./tmp", "laf.xls");

$workbook =& new Spreadsheet_Excel_Writer_Workbook($fname);
$workbook->setVersion(8); //I need this for some reasons
$worksheet =& $workbook->addworksheet('test');

$worksheet->writeString( 5, 1, "ceci n'est qu'un test totalement bidon", $fTxtCell_2);
$worksheet->writeNote( 5, 1, "ceci n'est qu'un test de note totalement bidon");
$workbook->close();
?>

Expected result:
----------------
The created xls document should open correctly.
The cell (5,1) should contain "ceci n'est qu'un test totalement bidon" and it's associated note should be "ceci n'est qu'un test de note totalement bidon".

Actual result:
--------------
I've got a lovely message box saying that memory cannot be read and excel will be closed

[2006-03-23 05:59 UTC] ajones at ca dot umces dot edu

Would like to add that I have the same problem, when using SetVersion(8) and the writeNote function, Excel 2003 crashes and says there are too many problems to fix. Once I remove the writeNote function it works perfectly.

[2006-11-09 12:58 UTC] tomgu at hotmail dot com

I have the same problem (using Spreadsheet_Excel_Writer 0.9.0).

The problem only occurs when using excel format version 8 and the writeNote-method:

$workbook = new Spreadsheet_Excel_Writer();
$workbook->setVersion(8);

$worksheet =& $workbook->addWorksheet('myTitle');
$worksheet->setInputEncoding('utf-8'); //Not needed to provoke bug
$worksheet->writeNote('myNote');

PHP 4.3.4
MS EXCEL XP (2003) SP2
Spreadsheet_Excel_Writer 0.9.0
OLE-0.5