Page 1 of 1

Write XML buffer overflow exception

Posted: Fri Nov 29, 2013 3:28 pm
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?

Re: Write XML buffer overflow exception

Posted: Tue Dec 03, 2013 4:20 pm
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.

Re: Write XML buffer overflow exception

Posted: Wed Dec 04, 2013 11:49 am
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?

Re: Write XML buffer overflow exception

Posted: Wed Dec 04, 2013 9:56 pm
by larsa
Hello

The update is ready now (5.20.10).

Re: Write XML buffer overflow exception

Posted: Mon Nov 12, 2018 3:57 pm
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...