I have problem with two excel functions - column() and row() . Probably the xlsrw calculate does not work properly.
Template:

After write a value 1 to the template cell A1, calculate and save it, the result has wrong values.
Result:

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.