trouble with concatenate and file error with IF
Posted: Wed Jan 14, 2009 1:20 pm
Hi,
I found 2 anothers bugs :
Concatenate is not working (but I can use &)
and the IF raise file error on xls and #N/A!
procedure TFPrinc.Button2Click(Sender: TObject);
var xls:TXLSReadWriteII4;
sh:TSheet;
begin
xls:=TXLSReadWriteII4.Create(nil);
sh:=xls.Sheets[0];
sh.AsFormula[0,0]:='2+2';
sh.AsFormula[0,1]:='concatenate("Total : ";A1)'; // bug is here, you get #VALUE!
sh.AsFormula[0,2]:='"Total : "&A1'; // work : Total : 4
sh.AsFormula[0,3]:='IF(A1>4;A1;"")'; // when open xls, error message "data lost" and #N/A! in the cell
xls.Filename:='test.xls';
xls.Write;
xls.Free;
end;
I found 2 anothers bugs :
Concatenate is not working (but I can use &)
and the IF raise file error on xls and #N/A!
procedure TFPrinc.Button2Click(Sender: TObject);
var xls:TXLSReadWriteII4;
sh:TSheet;
begin
xls:=TXLSReadWriteII4.Create(nil);
sh:=xls.Sheets[0];
sh.AsFormula[0,0]:='2+2';
sh.AsFormula[0,1]:='concatenate("Total : ";A1)'; // bug is here, you get #VALUE!
sh.AsFormula[0,2]:='"Total : "&A1'; // work : Total : 4
sh.AsFormula[0,3]:='IF(A1>4;A1;"")'; // when open xls, error message "data lost" and #N/A! in the cell
xls.Filename:='test.xls';
xls.Write;
xls.Free;
end;