Page 1 of 1
Access violation when writing a xlsx file on 64bit
Posted: Fri Mar 22, 2013 12:50 pm
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
Re: Access violation when writing a xlsx file on 64bit
Posted: Sun Mar 24, 2013 1:44 pm
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;
Re: Access violation when writing a xlsx file on 64bit
Posted: Mon Mar 25, 2013 4:07 am
by rhwang46
I have encountered the same access violation in XE2. The same problem happened while compiling then executing the provided sample program DirectWrite.
Re: Access violation when writing a xlsx file on 64bit
Posted: Mon Mar 25, 2013 4:21 am
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.
Re: Access violation when writing a xlsx file on 64bit
Posted: Mon Mar 25, 2013 4:25 am
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.
Re: Access violation when writing a xlsx file on 64bit
Posted: Mon Mar 25, 2013 6:47 am
by larsa
Hello
The problem is fixed in update 5.10.08.