NaN (Not A Number) values now are read as '' (nothing) instead as "NaN".
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2760 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
30bcff1574
commit
fa1ffd579f
@ -665,6 +665,10 @@ end;
|
||||
function TsWorksheet.ReadAsUTF8Text(ARow, ACol: Cardinal): ansistring;
|
||||
var
|
||||
ACell: PCell;
|
||||
function FloatToStrNoNaN(const Value: Double): ansistring;
|
||||
begin
|
||||
if IsNan(Value) then Result:='' else Result:=FloatToStr(Value);
|
||||
end;
|
||||
begin
|
||||
ACell := FindCell(ARow, ACol);
|
||||
|
||||
@ -677,7 +681,7 @@ begin
|
||||
case ACell^.ContentType of
|
||||
|
||||
//cctFormula
|
||||
cctNumber: Result := FloatToStr(ACell^.NumberValue);
|
||||
cctNumber: Result := FloatToStrNoNaN(ACell^.NumberValue);
|
||||
cctUTF8String: Result := ACell^.UTF8StringValue;
|
||||
cctDateTime: Result := SysUtils.DateToStr(ACell^.DateTimeValue);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user