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.
Hyperlinks to local paths do not work.
Re: Hyperlinks to local paths do not work.
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'
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'
Lars Arvidsson, Axolot Data
Re: Hyperlinks to local paths do not work.
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.
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.