Issue with asformula
Posted: Thu Jan 08, 2009 1:09 pm
I have the 4.00.12 registred version, and asformula have problem :
Try this
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 : =CONCATENATE("Total : ";A1;A1) !!!!! and #VALUE!
sh.Calculate(0,1);
xls.Filename:='test.xls';
xls.Write;
xls.Free;
end;
The end of formula is duplicated !
CONCATENATE("Total : ";A1)
give
CONCATENATE("Total : ";A1;A1)
and the calcul don't work
Any idea ?
Try this
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 : =CONCATENATE("Total : ";A1;A1) !!!!! and #VALUE!
sh.Calculate(0,1);
xls.Filename:='test.xls';
xls.Write;
xls.Free;
end;
The end of formula is duplicated !
CONCATENATE("Total : ";A1)
give
CONCATENATE("Total : ";A1;A1)
and the calcul don't work
Any idea ?