Incorrect Float Value

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
BodryAngel
Posts: 2
Joined: Thu Mar 19, 2015 10:41 am

Incorrect Float Value

Post 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?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Incorrect Float Value

Post by larsa »

Hello

This is fixed in update 5.20.45
Lars Arvidsson, Axolot Data
BodryAngel
Posts: 2
Joined: Thu Mar 19, 2015 10:41 am

Re: Incorrect Float Value

Post by BodryAngel »

larsa wrote: This is fixed in update 5.20.45
Thanks
Post Reply