Calculate for COLUMN() and ROW() does not work properly

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
jsfkcz
Posts: 29
Joined: Thu Sep 11, 2014 8:29 am

Calculate for COLUMN() and ROW() does not work properly

Post by jsfkcz »

Helo,
I have problem with two excel functions - column() and row() . Probably the xlsrw calculate does not work properly.
Template:
Image
After write a value 1 to the template cell A1, calculate and save it, the result has wrong values.
Result:
Image

If I press Ctrl+Alt+F9 to manually calculate the sheet, all values become correct.

The template and result are at http://www.genet.cz/kohout/xlsrw/xlsrw_column_row.zip for download.

Code: Select all

    procedure TForm1.Button1Click(Sender: TObject);
    const
      cOrigFile = 'template.xlsx';
      cTestFile = 'result.xlsx';
    var
      ASheet: TXLSWorksheet;
    begin
      CopyFile(cOrigFile,cTestFile,False);
      xlsRW.Filename:= cTestFile;
      xlsRW.Read;
      ASheet:= xlsRW.SheetByName('DATA');
      asheet.asinteger[0,0]:=1; // cell C1
      xlsRW.calculate;
      xlsRW.Write;
    end;
    end.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Calculate for COLUMN() and ROW() does not work properly

Post by larsa »

Hello

This will be fixed in the next update.
Lars Arvidsson, Axolot Data
Post Reply