Page 1 of 1

EListError exception when deleting a sheet (v5.10.17)

Posted: Wed Apr 17, 2013 5:07 pm
by jleg
Hello,

if you execute the code below, you will get an EListError exception.

Code: Select all

XLS.Version := xvExcel97;
XLS.Delete(0);
XLS.Add;
XLS.FileName := 'C:\Test.xls';
XLS.Write;
I think the pb is that in the TXLSWorkBook.Delete method, the FManager.Worksheets.Count is Ok (value = 1) but when you use WritePrepare or WriteToStream method (i don't remember exactly), the FSheets.Count value is 2 so when you access the second sheet that doesn't exist, you get the EListError exception (it's just a start search of course)

Re: EListError exception when deleting a sheet (v5.10.17)

Posted: Mon Apr 22, 2013 1:16 pm
by larsa
Hello

This is fixed in 5.10.18