Page 1 of 1

MIN formula Error

Posted: Fri Aug 06, 2010 6:40 am
by jjsverylong
I coded as follows.

procedure TForm1.Button1Click(Sender: TObject);
var
loSheet: TSheet;
i: integer;
begin
xls.Filename := 'TestXls.xls';

loSheet := xls.Sheet[0];
loSheet.AsFloat[0,0] := 30;
loSheet.AsFloat[1,0] := 10;
loSheet.AsFloat[2,0] := 20;

loSheet.AsFormula[0, 1] := 'MIN(A1, B1)'; // this cell is OK

loSheet.AsFormula[0, 2] := 'MIN(A1-B1,C1)'; // this cell shows #VALUE error
xls.Write;
end;

After run and Click the button, Excel file is generated OK. But when I open that excel file from EXCEL,
Cell [0,2] shows #VALUE error.

What Is the problem?