Page 1 of 1

Incorrect Float Value

Posted: Thu Mar 19, 2015 11:12 am
by BodryAngel
Hello.
When performing the simple code

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var
  XLS: TXLSReadWriteII5;
begin
  XLS := TXLSReadWriteII5.Create(nil);
  try
    XLS.Add;
    XLS.Sheets[0].Columns.SetColWidth(0,0, 10000);
    XLS.Sheets[0].Columns.SetColWidth(1,1, 10000);
    XLS.Sheets[0].AsFloat[0,0] := 12670996925/10;
    XLS.Sheets[0].AsString[1,0] := FloatToStr(12670996925/10);
    XLS.SaveToFile('d:\test.xlsx');
   finally
    FreeAndNil(XLS);
  end;
end;
We get in cell A1 value = -21390496,3
We get in cell B1 value = 1267099692,5

As such can be? Possible this correct?

Re: Incorrect Float Value

Posted: Sun Mar 22, 2015 5:22 pm
by larsa
Hello

This is fixed in update 5.20.45

Re: Incorrect Float Value

Posted: Mon Mar 23, 2015 7:45 am
by BodryAngel
larsa wrote: This is fixed in update 5.20.45
Thanks