Exception with MoveCells
Posted: Wed May 28, 2008 9:16 am
Hello,
I get always exceptions "access violation" when I use MoveCells. Here a simple excample:
procedure TForm1.btn_MoveClick(Sender: TObject);
var
intC,intR : integer;
XLS: TXLSReadWriteII4;
begin
XLS := TXLSReadWriteII4.Create(Self);
XLS.Filename := 'Move1.xls';
for intC := 0 to 20 do
begin
XLS.Sheet[0].AsString[intC, 0] := 'Text '+IntToStr(intC);
XLS.Sheet[0].AsFloat[intC, 3] := 100+intC;
end;
XLS.MoveCells(0,0,3,10,4,0,0,6,CopyAllCells);
XLS.Write;
XLS.Free;
end;
I just want to move row 3 and 4 to row 6 as an excample. (But not the whole row)
I use ComponentVersion 4.00.00, Delphi 6 or 2007
Thank you
Lothar
I get always exceptions "access violation" when I use MoveCells. Here a simple excample:
procedure TForm1.btn_MoveClick(Sender: TObject);
var
intC,intR : integer;
XLS: TXLSReadWriteII4;
begin
XLS := TXLSReadWriteII4.Create(Self);
XLS.Filename := 'Move1.xls';
for intC := 0 to 20 do
begin
XLS.Sheet[0].AsString[intC, 0] := 'Text '+IntToStr(intC);
XLS.Sheet[0].AsFloat[intC, 3] := 100+intC;
end;
XLS.MoveCells(0,0,3,10,4,0,0,6,CopyAllCells);
XLS.Write;
XLS.Free;
end;
I just want to move row 3 and 4 to row 6 as an excample. (But not the whole row)
I use ComponentVersion 4.00.00, Delphi 6 or 2007
Thank you
Lothar