Page 1 of 1

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

Posted: Wed Jan 14, 2015 3:09 pm
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.

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

Posted: Thu Jan 22, 2015 6:59 pm
by larsa
Hello

This will be fixed in the next update.