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

Inpropper results from writeUrl() method

Details

Submitted2004-11-24 21:08 UTC
Fromjustin at astutecomputing dot com
Assignedxnoguer
StatusClosed
PackageSpreadsheet_Excel_Writer
PHP Version4.3.6
OSLinux (Red Hat 7.2)
Roadmaps(Not assigned)

Comments

[2004-11-24 21:08 UTC] justin at astutecomputing dot com

Description:
------------
I'm using Spreadsheet_Excel_Writer to create two Excel files (file A and file B), each with one worksheet. I'm trying to place a hyper-link in File A that maps to file B. When the user clicks on the link in File A, File B should open to the correct worksheet and cell. The hyperlink is created, but the file name is excluded from the path.

Reproduce code:
---------------
<?php
require_once("/usr/local/lib/php/Spreadsheet/Excel/Writer.php");

$workbook1 = new Spreadsheet_Excel_Writer('temp/activity.xls');
$worksheet1 =& $workbook1->addWorksheet('activity');
$worksheet1->write(0, 0, 'this is the data linked to');
$workbook1->close();

// Creating a workbook for the prospects and write to the server.
$workbook = new Spreadsheet_Excel_Writer('temp/prospects.xls');
$worksheet =& $workbook->addWorksheet('prospects');
$worksheet->writeUrl(0, 0, "external:activity.xls#activity!A1", 'this is the link');
$workbook->close();

print "done";
exit(0);
?>

Expected result:
----------------
I expect two files. The file prospects.xls should have one worksheet containing a link. That link should open the activity worksheet in activity.xls.

Actual result:
--------------
The file are created as expected, but the link in the prospects file does not open the activity file.

[2005-11-12 03:35 UTC] xnoguer at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

Seems to work now, as long as you don't use cell ranges for the url. Please test the cvs version.