EAccessViolation when writing date val. to an existing file.

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

EAccessViolation when writing date val. to an existing file.

Post by d3nton »

Hello larsa.
Could you please take a look at the sample code below.
It produces an AccessViolation when writing date values to an already existing xls file.
I am using XLSReadWrite v5.10.14 on Delphi XE2:

Sample code:
var
ExcelFile5 : TXLSReadWriteII5;
lindex :Integer;
begin
ExcelFile5 := TXLSReadWriteII5.Create(nil);
ExcelFile5.Version := Xc12Utils5.xvExcel97;
ExcelFile5.Filename := 'D:\output.xls';
for lIndex := 0 to 1000 do begin
ExcelFile5[0].AsDateTime[0,lindex] := date;
end;
ExcelFile5.Write;
ExcelFile5.Read;
for lIndex := 0 to 1000 do begin
ExcelFile5[0].AsDateTime[0,lindex] := date;
end;
ExcelFile5.Write; <- AccessViolation
end.

thanks for help. d3nton
d3nton
Posts: 133
Joined: Thu Oct 25, 2012 9:48 am

Re: EAccessViolation when writing date val. to an existing file.

Post by d3nton »

Are there any news regarding this issue?
It is still reproducible with V5.10.18.
A fix would be nice.
Thank you.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: EAccessViolation when writing date val. to an existing file.

Post by larsa »

Hello

This will be fixed in the next update, posted next week.
Lars Arvidsson, Axolot Data
d3nton
Posts: 133
Joined: Thu Oct 25, 2012 9:48 am

Re: EAccessViolation when writing date val. to an existing file.

Post by d3nton »

Okay.
Thanks for your support!
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: EAccessViolation when writing date val. to an existing file.

Post by larsa »

Hello

This is fixed in update 5.10.19
Lars Arvidsson, Axolot Data
Post Reply