Page 1 of 1

Formula problem

Posted: Fri Sep 09, 2022 12:13 pm
by nagygabor679
Hi,

I would like set formulas by my program.
When the btn3Click procedure is executed, I see a zero number at cell B2, but "2" is expected.
(If I export the table into XLSX file, and I load into Excel, then I see "2" in the cell.)

Question 1: how can I update, recalculate or do anything, if I would like see the computed result in XLSSpreadSheet?
Question 2: why I get Acces Violation, after press btn3, if I try to type a number into any cell, anywhere?

Code: Select all

procedure TForm1.btn3Click(Sender: TObject);
begin
  xs.XLS[0].AsFormula[1,1]:='=1+1';
  xs.InvalidateSheet;
end;
Thanks,
Gábor