Hi
if i use XLS.SheetByName('Legenda').AsFloat[cc,ct] to write the string '-2.03' it tells me that isn't a float.
What i have to use in delphi in ordrer to write a signed number?if i use .asString or .asVariant Excel tells me that is a number written as a text and isn't good for me cause i wanna a signed number.
Thank you
writing signed float to excel
Re: writing signed float to excel
Hello
There is no method in the component for parsing strings as numbers, but you can easily create one yourself:
There is no method in the component for parsing strings as numbers, but you can easily create one yourself:
Code: Select all
var
S: string;
N: double ;
begin
S := '-2.03';
if TryStrToFloat(S,N) then
XLS[0].AsFloat[1,1] := N
else
XLS[0].AsFloat[1,1] := S;
end;
Lars Arvidsson, Axolot Data