Write XML buffer overflow exception

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
wh147
Posts: 3
Joined: Thu Nov 28, 2013 12:33 pm

Write XML buffer overflow exception

Post by wh147 »

Hello,

I got this error ('Write XML buffer overflow') when I tried to write xlsx file with some fields which consist huge string (it was CLOB field received from Oracle DB). With some amount of these fields, Write() method raised the error.
Could you please advise how long strings could be written?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Write XML buffer overflow exception

Post by larsa »

Hello

Max string length in excel 32767 chars, but this is not possible right now as it gives your error message.

This will be fixed in the next update.
Lars Arvidsson, Axolot Data
wh147
Posts: 3
Joined: Thu Nov 28, 2013 12:33 pm

Re: Write XML buffer overflow exception

Post by wh147 »

Hi,
Could you tell when we could expect to have this update? We have a lot of such issues with long strings that are extremely important for our customers. How could we track the new version is released?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Write XML buffer overflow exception

Post by larsa »

Hello

The update is ready now (5.20.10).
Lars Arvidsson, Axolot Data
timokhov
Posts: 8
Joined: Sun Oct 28, 2018 4:16 pm

Re: Write XML buffer overflow exception

Post by timokhov »

It looks like that maximum length of string is 32766, but not 32767.
Simple example prooves it:

Code: Select all

const
   cMax = 32766; // no exception
   // cMax = 32767; // exception "Write XML buffer owerflow" occures.
var
   xls: TXLSReadWriteII5;
begin
   xls := TXLSReadWriteII5.Create(nil);
   xls[0].AsString[0,0] := StringOfChar('0', cMax);
   xls.FileName := 'd:\book_sst.xlsx';
   xls.Write();
end;
I think it is good idea to mention it in documentation near TXLSWorksheet.AsString propety.

BTW there are several @linkt(...), but not @link(...). Thouse links don't work in HTML-doc...
Post Reply