Access violation when writing a xlsx file on 64bit

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

Access violation when writing a xlsx file on 64bit

Post by d3nton »

Hello.
I got an access violation when trying to execute the following code on 64bit (xlsReadWrite 5.10.07):

var
ExcelFile5 : TXLSReadWriteII5;

begin
ExcelFile5 := TXLSReadWriteII5.Create(nil);
ExcelFile5.Filename := 'D:\output.xlsx';

ExcelFile5.Sheets[0].AsFloat[0, 0] := 10000000;

ExcelFile5.Write;

end.

regard d3nton
rjvanvliet
Posts: 17
Joined: Fri Feb 01, 2013 8:24 pm

Re: Access violation when writing a xlsx file on 64bit

Post by rjvanvliet »

I got this problem too.

The exception comes from this routine in xpgPXML:

procedure TXpgWriteXML.AddAttribute(const AName, AValue: AxUCString);
begin
AddAttr(AName);
AddAttr('="');
CopyToBufUTF8(AValue);
AddAttr('" ');
end;
rhwang46
Posts: 5
Joined: Sat Oct 08, 2005 3:48 am

Re: Access violation when writing a xlsx file on 64bit

Post by rhwang46 »

I have encountered the same access violation in XE2. The same problem happened while compiling then executing the provided sample program DirectWrite.
rhwang46
Posts: 5
Joined: Sat Oct 08, 2005 3:48 am

Re: Access violation when writing a xlsx file on 64bit

Post by rhwang46 »

While I look through the QA in this forum, I found someone has already posted the temporary fix for the problem. That is to change the order of two included units in the USES section. The correct order is XLSReadWriteII5,XLSSheetData5 not the other way around.
rhwang46
Posts: 5
Joined: Sat Oct 08, 2005 3:48 am

Re: Access violation when writing a xlsx file on 64bit

Post by rhwang46 »

But I still encountered the same access violation in the DirectWrite sample program after I rearrange the order of these two units. I am using Delphi XE2 targeted 32bit platform in the Windows 7 64bits.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Access violation when writing a xlsx file on 64bit

Post by larsa »

Hello

The problem is fixed in update 5.10.08.
Lars Arvidsson, Axolot Data
Post Reply