Negative size values when exporting to 64bit (V5.10.08)

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
d3nton
Posts: 137
Joined: Thu Oct 25, 2012 9:48 am

Negative size values when exporting to 64bit (V5.10.08)

Post by d3nton »

Hi!
The following code produces negative values in the excel output file when compiling with 64bit:

var
ExcelFile5 : TXLSReadWriteII5;
begin
ExcelFile5 := TXLSReadWriteII5.Create(nil);
ExcelFile5.Filename := 'D:\output.xlsx';
ExcelFile5.Sheets[0].AsFloat[0,0] := 2937958862; <- is -1357008434 in the output file

ExcelFile5.Write;
end.

The issue exists also when exporting to a xls file.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Negative size values when exporting to 64bit (V5.10.08)

Post by larsa »

Hello

Caused by the buggy RoundTo function. Fixed in version 5.10.09
Lars Arvidsson, Axolot Data
d3nton
Posts: 137
Joined: Thu Oct 25, 2012 9:48 am

Re: Negative size values when exporting to 64bit (V5.10.08)

Post by d3nton »

Hello

With V5.10.09 it seems to be vice versa.
On 64bit it works well but now I get a negative value if compiling the code above in 32bit.
Chipman
Posts: 2
Joined: Tue Apr 02, 2013 9:46 am

Re: Negative size values when exporting to 64bit (V5.10.08)

Post by Chipman »

Using version 5.10.10 with D7 the problem persist.

ExcelFile.Sheets[0].AsFloat[0, 0] := 123456789.12; yields -5392229,76 in the output.xlsx file.

No problem for integer values though.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Negative size values when exporting to 64bit (V5.10.08)

Post by larsa »

Hello

D7 64-bit?
Lars Arvidsson, Axolot Data
Chipman
Posts: 2
Joined: Tue Apr 02, 2013 9:46 am

Re: Negative size values when exporting to 64bit (V5.10.08)

Post by Chipman »

D7 64 bit. That would be something.
Sorry, just appending on an existing thread. Same problem, but 32 bit Delphi.
Thx for looking.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Negative size values when exporting to 64bit (V5.10.08)

Post by larsa »

Hello

This was another error than the first mentioned in this thread. Will be fixed in the next update, 5.10.11, probably ready april 2.
Lars Arvidsson, Axolot Data
Post Reply