Unable to create hyperlink

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
zvasku
Posts: 14
Joined: Wed Aug 01, 2012 2:22 pm

Unable to create hyperlink

Post by zvasku »

Hello,

I have this code in version 4 to create hyperlink to secont sheet (in one workbook):

with XLS[0].Hyperlinks.Add do begin
Col1:=1;
Col2:=1;
Row1:=Row0;
Row2:=Row0;
Address:='''Definice pokladních operací''!C100';
end;

But with version 5, this hyperlnik do not work. If I click on it nothing happens.

Thanks
Zdenek
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Unable to create hyperlink

Post by larsa »

Hello

Your sheet name is wrong. There shall not be any quotes in the sheet name.
Lars Arvidsson, Axolot Data
zvasku
Posts: 14
Joined: Wed Aug 01, 2012 2:22 pm

Re: Unable to create hyperlink

Post by zvasku »

If I remove quotes, it's still not working.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Unable to create hyperlink

Post by larsa »

Hello

I can't reproduce this.

Please provide a code sample that can compile.
Lars Arvidsson, Axolot Data
zvasku
Posts: 14
Joined: Wed Aug 01, 2012 2:22 pm

Re: Unable to create hyperlink

Post by zvasku »

Sorry to be to late. Lot of another work. Here is code sample

XLS.Insert(1);
XLS.Sheets[0].Name:='Přehled pokladních operací';
XLS.Sheets[1].Name:='Definice pokladních operací';
XLS.Sheets[0].AsInteger[1,10]:=1;
with XLS.Sheets[0].Hyperlinks.Add do begin
Col1:=1;
Col2:=1;
Row1:=10;
Row2:=10;
Address:='''Definice pokladních operací''!C'+IntTOStr(Row+1);
end;
Post Reply