Example screenshot:

Here I deleted rows 0 to 4 (index). The merged cell isnt deleted and disturbs the remaining document.
Code: Select all
DeleteRows(0, 0, 4);
Code: Select all
DeleteRows(0, 4, 4);
Code: Select all
try
LDoc := TXLSReadWriteII5.Create(nil);
LDoc.Filename := LSource;
LDoc.Read;
LDoc.DeleteRows(0, 21, 28);
LDoc.Filename := LTarget;
LDoc.Write;
finally
freeAndNil(LDoc);
end;