EAccessViolation when writing date val. to an existing file.
Posted: Wed Apr 10, 2013 8:27 am
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
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