Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.4

Bug #2823 Inpropper results from writeUrl() method
Submitted: 2004-11-24 21:08 UTC
From: justin at astutecomputing dot com Assigned: xnoguer
Status: Closed Package: Spreadsheet_Excel_Writer
PHP Version: 4.3.6 OS: Linux (Red Hat 7.2)
Roadmaps: (Not assigned)    

 [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 by the end of next Sunday (CET). If this was a problem with the 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.
 [2008-06-04 15:10 UTC] sascham78 (Sascha Meyer)
I replaced my spreadsheet_excel_writer package with the latest files from CVS, but I am still running into problems if I want to refer to files in a subfolder. This code does not work for me: $sheet->writeUrl (1, 1, "external:files/export301.xls", "export301.xls"); The link is created in the excelsheet, but excel displays "could not open file" when the link is clicked. I changed the code to test the functionality to: $sheet->writeUrl (1, 1, "external:export301.xls", "export301.xls"); // removed the subfolder and added the export301.xls file to the current folder, but when I click the link, Excel doesn't know how to handle the file and instead Word opens with an import dialogue. Any ideas what could be wrong?