List Index out of bounce exception in ReadSheetCondFmt

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

List Index out of bounce exception in ReadSheetCondFmt

Post by d3nton »

Hi!

I get a 'List index out of bounds' exception' in procedure TXLSReadXLSX.ReadSheetCondFmt when trying to read an xlsx excel file
with conditinal formatting.

The excel file can be downloaded here:
hxxp://www.file-upload.net/download-7297408/test.xlsx.html

Sample Code:
var
ExcelFile : TXLSReadWriteII5;
begin
ExcelFile := TXLSReadWriteII5.Create(nil);
ExcelFile.Filename := 'D:\test.xlsx';
ExcelFile.Read(); <- Exception
end.

d3nton
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: List Index out of bounce exception in ReadSheetCondFmt

Post by larsa »

Hello

This will be fixed in the next update, ready by the beginning of next week.
Lars Arvidsson, Axolot Data
d3nton
Posts: 137
Joined: Thu Oct 25, 2012 9:48 am

Re: List Index out of bounce exception in ReadSheetCondFmt

Post by d3nton »

Hi!
Okay. Thank you for your support!
d3nton
Posts: 137
Joined: Thu Oct 25, 2012 9:48 am

Re: List Index out of bounce exception in ReadSheetCondFmt

Post by d3nton »

Unfortunately the error seems not to be solved.
With the code above (and the same excel file) I am getting a
class Exception with message 'Row 0 Unknown Attribute "xmlns"'.

An additional suggestion:
It would be nice if XLSReadWrite would not raise an usual Exception (for the fErrorEvent or the
TXpgPErrors) but raise an XLSReadWriteException
which would enhance the error handling for other users.

Best regards!
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: List Index out of bounce exception in ReadSheetCondFmt

Post by larsa »

Hello

This is fixed in update 5.10.05
The exception is not a real error, the problem was that the message was not routed trough the error handler.
Lars Arvidsson, Axolot Data
d3nton
Posts: 137
Joined: Thu Oct 25, 2012 9:48 am

Re: List Index out of bounce exception in ReadSheetCondFmt

Post by d3nton »

Thank you!
Post Reply