Page 1 of 1

Hyperlinks to local paths do not work.

Posted: Fri Mar 22, 2013 2:52 pm
by d3nton
Hi!

I tried to create hyperlinks with the following code using XLS ReadWrite 5.10.07:
var
ExcelFile5 : TXLSReadWriteII5;

begin
ExcelFile5 := TXLSReadWriteII5.Create(nil);
ExcelFile5.Filename := 'D:\output.xlsx';

ExcelFile5.Sheets[0].MakeHyperlink(0,0,'C:\Windows', 'C:\Windows' );
ExcelFile5.Write;
end.

It seems that XLSReadWrite converts the address C:\Windows to ..\Windows (unit xlshyperlinks5; function setAddress).
If I open the excel file afterwards and try to click on the hyperlink, the path cannot be found.

If I try to add hyperlinks to an xls (Excel97) file, the hyperlink address is empty.

Re: Hyperlinks to local paths do not work.

Posted: Mon Mar 25, 2013 6:49 am
by larsa
Hello

The problem is fixed in update 5.10.08.

In order to make sure that a file is detected correct, write files as 'file///c:\MyFile.txt'

Re: Hyperlinks to local paths do not work.

Posted: Mon Mar 25, 2013 8:24 am
by d3nton
Thank you.

Works for XLSX files.
Unforatunately the hyperllinks in xls files are still broken (no address is set):

var
ExcelFile5 : TXLSReadWriteII5;

begin
ExcelFile5 := TXLSReadWriteII5.Create(nil);
ExcelFile5.Version := xvExcel97;
ExcelFile5.Filename := 'D:\output.xls';

ExcelFile5.Sheets[0].MakeHyperlink(0,0,'file:///C:\Windows', 'C:\Windows' );
ExcelFile5.Write;
end.