Page 1 of 1
MoveCells with ccoLockStartRow option
Posted: Wed Oct 07, 2015 8:20 am
by huseyinxy
XLSReadWriteII 5, in MoveCells method option ccoLockStartRow is not working as expected.
Moving a cell from B3 to B15 with a formula something like that =SUM(B3:B3), new formula must be =SUM(B3, B15) with ccoLockStartRow option but formula changes to = SUM(B15:B15)
ccoLockStartRow option has no affect in MoveCells XLSReadWriteII 5
Re: MoveCells with ccoLockStartRow option
Posted: Mon Oct 12, 2015 12:57 pm
by larsa
Hello
True. ccoLockStartRow is not implemented. Will fix this in a later update.
Re: MoveCells with ccoLockStartRow option
Posted: Thu Oct 22, 2015 6:07 am
by huseyinxy
Hi, when the next update will be ready
Re: MoveCells with ccoLockStartRow option
Posted: Thu Oct 29, 2015 9:13 am
by larsa
Hello
It will probably take a couple of weeks. We have a lot of do right now.
Re: MoveCells with ccoLockStartRow option
Posted: Mon Nov 30, 2015 7:37 am
by huseyinxy
Hello, is there any improvement in this subject, it's some urgent.
Re: MoveCells with ccoLockStartRow option
Posted: Wed Dec 02, 2015 3:53 pm
by larsa
Hello
This is fixed in update 5.20.65
Re: MoveCells with ccoLockStartRow option
Posted: Thu Dec 03, 2015 8:57 am
by huseyinxy
Hello,
Thank you for the update. But unfortunately my problem still unsolved case.
In my debug sesssion notice that Workbook movecells method calls copycells with copyoptions and than it calls sheets copycells method with copyoptions but in this method ccoLockStartRow option still not implemented.
My sample xls file and code is below
with
TXlsReadWriteII class sample code works properly
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
fn1, fn2: string;
Excel: TXlsReadWriteII;
begin
fn1 := 'D:\Tests\Excel\MoveCell\temp1.xls';
fn2 := 'D:\Tests\Excel\MoveCell\temp2.xls';
Excel := TXLSReadWriteII.Create(nil);
Excel.Filename := fn1;
Excel.Read;
//move row5 to row10
Excel.MoveCells(0, 1, 5, 3, 5,
0, 1, 10,
True, True);
Excel.Filename := fn2;
Excel.Write;
Excel.Free;
end;
sample xls file1 content
A B C
1 a1 b1 10
2 a2 b2 20
3 a3 b3 30
4 a4 b4 40
5 a5 b5 50
6 a6 Tot =SUM(C1:C5)
Same code with the new
TXlsReadWriteII5 class is not worked as expected
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
fn1, fn2: string;
Excel: TXlsReadWriteII5;
begin
fn1 := 'D:\Tests\Excel\MoveCell\temp1.xls';
fn2 := 'D:\Tests\Excel\MoveCell\temp2.xls';
Excel := TXLSReadWriteII5.Create(nil);
Excel.Filename := fn1;
Excel.Read;
//move row5 to row10
Excel.MoveCells(0, 1, 5, 3, 5,
0, 1, 10,
CopyAllCells + [ccoAdjustCells, ccoLockStartRow]);
Excel.SaveToFile(fn2);
Excel.Free;
end;
sample xls file2 content
A B C
1 a1 b1 10
2 a2 b2 20
3 a3 b3 30
4 a4 b4 40
5 a5 b5 50
6
7
8
9
10
11 Tot =SUM(C6:C10) // expected 11 Tot =SUM(C1:C10)
Re: MoveCells with ccoLockStartRow option
Posted: Wed Dec 09, 2015 12:45 pm
by larsa
Hello
Forgot to include the fix when moving cells between sheets. Fixed in update 5.20.66
Re: MoveCells with ccoLockStartRow option
Posted: Thu Dec 10, 2015 7:52 am
by huseyinxy
It works, thank you for update