Formula problem

Questions and answers on how to use XLSSpreadSheet.
Post Reply
nagygabor679
Posts: 4
Joined: Wed Sep 07, 2022 8:07 am

Formula problem

Post 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
Post Reply