Apache OpenOffice (AOO) Bugzilla – Issue 121408
Hyperlink to an Excel Spreadsheet
Last modified: 2013-07-09 09:30:16 UTC
Created attachment 79952 [details] Hyperlink example Hi, I found a bug that is already solved in LibO, but in AOO you will get an error. Steps: 1. create an Excel spreadsheet with one or two tables 2. open an empty calc spreadsheet 3. go to cell A1 and open the Hyperlink dialog (alternative: you can use the Hyperlink function, too) 4. create a link to the previously created excel document and one of the table inside, i.e. "file:///C:/tmp/test.xls#Tabelle2" 5. save the hyperlink 6. Now click on the hyperlink in the calc document. You will get an error, that the document can not be found. If you do the same with a Calc document, everything is fine. My customer has several documents with mutiple of such links, so that this is a big issue for him. Would be great, if someone could help by this! Regards
Created attachment 79953 [details] excel source file
(In reply to comment #1) > Creado adjunto 79953 [detalles] > excel archivo de origen Hello Georg, well you would have to verify your address when entering your hiprvinculo. since I've done the same example and if I carried the 2 tables when clicking on the hyperlink. at first I threw the same error as you, but I found that it was because he was not agragando the # at the end of the address. I hope I helped found. regards
(In reply to comment #2) > (In reply to comment #1) > > Creado adjunto 79953 [detalles] > > excel archivo de origen > > > Hello Georg, well you would have to verify your address when entering your > hiprvinculo. since I've done the same example and if I carried the 2 tables > when clicking on the hyperlink. > at first I threw the same error as you, but I found that it was because he > was not agragando the # at the end of the address. > > I hope I helped found. > regards Sorry I don't know what you mean, the hyperlink looks like file:///S:/temp/Test.xls#Table1 and the # is needed to select the Table1. I'll get sill the error. Regards Georg
confirmed issue I can reproduce the problem. From another spreadsheet via the hyperlink function it don't work. When I open the link directly it works, for example soffice file:///Users/jsc/Downloads/test.xls#Tabelle2
A click on a hyperlink is eventually forwarded to XSystemShellExecute::execute(). On Windows this is implemented by the CSysShExec class in main/shell/source/win32/SysShExec.cxx. In the case at hand the given URL is transformed by a call to ::osl::FileBase::getSystemPathFromFileURL() which removes the leading file:/// but leaves the trailing #Tabelle2. The resulting file name is invalid because of the #Tabelle2 suffix and therefore can not be opened. An experiment in which the file:///... URL was fed directly to the Windows ShellExecuteExW() function was basically successful: it starts Excel and shows the correct document but does not jump to the second table. This last problem may be due to the fact that I tested this with an English localized Excel, which may not understand the German '#Tabelle2'.
I can not reproduce this bug on Linux. I also checked with LibreOffice on Windows. It is true that a (Ctrl-)click on the hyperlink opens the references test.xls documnent and shows the right table. But it does that with LibreOffice. On my system .xls is associated with Excel. Starting LibreOffice instead of Excel looks like an error.
change prio to p3