Hyperlinks + insert/delete columns/rows

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
Marcelo@Eco
Posts: 1
Joined: Wed Feb 11, 2015 5:32 pm

Hyperlinks + insert/delete columns/rows

Post by Marcelo@Eco »

I found a problem with hyperlinks and insert/delete columns/rows. I am using version 5.20.06.

Following code ilustrates the problem:

Code: Select all

procedure Teste(const AFilename: string);
var
    Excel: TXLSReadWriteII5;
begin
    Excel := TXLSReadWriteII5.Create(nil);
    try
        Excel.Version := xvExcel97;

        Excel[0].MakeHyperlink(0,0, 'http://www.google.com', 'Google', 'Go to Google');

        // insert some rows, hyperlinks will be moved
        Excel[0].InsertRows(0, 3);

        Excel.Calculate;

        // freeze here
        Excel.SaveToFile(AFilename);
    finally
        Excel.Free;
    end;
end;
TCellAreas.Move() frees existing hyperlinks and create new hyperlinks but it does not copy the pre-existing hyperlinks settings so the new hyperlinks have empty address, description and tooltip.

Could you look into this?
Post Reply