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

Output with mergeCells crashes Mac Excel

Details

Submitted2005-12-20 23:44 UTC
Fromjon dot bertsch at ucop dot edu
Assignedprogi1984
StatusNo Feedback
PackageSpreadsheet_Excel_Writer
PHP Version5.0.4
OSLinux SUSE 9.2
Roadmaps(Not assigned)

Comments

[2005-12-20 23:44 UTC] jon dot bertsch at ucop dot edu

Description:
------------
Mac OS 10.4.3
Excel: 2003
Pear: 1.4.5
Excel_Spreadsheet_Writer: 0.9

If you use mergeCells you must leave a blank line between the
merge cell line and a previous line that contains data or the
output file opens but then crashes.

Now this may be related to the bug #6118 and #1239 but it
happens whether or not you actually write any data to the
merged cells and it's only 8 columns across.

Test script:
---------------
On my system the following crashes excel:

$worksheet-> write($row, 3, "Data:", $format['boldRight']);
$worksheet-> write($row, 4, "Data", $format['alignLeft']);
$worksheet-> write($row, 7, "Data:", $format['boldRight']);
$worksheet-> write($row, 8, "Data", $format['alignRight']);

$row++;

$worksheet->mergeCells($row, 1, $row, 9);
$worksheet-> write($row, 5, "Schedule");

But adding an extra row is fine:

$worksheet-> write($row, 3, "Data:", $format['boldRight']);
$worksheet-> write($row, 4, "Data", $format['alignLeft']);
$worksheet-> write($row, 7, "Data:", $format['boldRight']);
$worksheet-> write($row, 8, "Data", $format['alignRight']);

$row++;
$row++;

$worksheet->mergeCells($row, 1, $row, 9);
$worksheet-> write($row, 5, "Schedule");