Open Excel template error

Hi Laurence,

The attachment contains 4 excel template files that causes Aspose.Excel to throw an exception when opening the files.

The exception messages are:

Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex
and

Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index 

Pls advise. Thanks,

Nick

Hi Nick,

This bug is caused by Data Validation settings in your template file. I fixed it. Please try this attached fix.

Hi Laurence,

The fix works great – once again proving that Aspose is one of our favorite companies to work with.

Thanks,
Nick
PS: let me know when you are coming over to Shanghai, i still owe you a dinner treat.

Laurence,

the attached file causes an ‘Index out of range’ exception. i believe this is due to unresolvable range-names. Aspose.Excel will open the file successfully if the Names are removed.

not sure if this needs to be handled by Aspose.Excel - for your reference.

thanks,
nick

Yes. This error is caused by defined Names. Currently Aspose.Excel doesn’t support defined name which refers to external file. Please remove those names in your file.

I will investigate and fix this problem. But it will take a relative long time for this is a complex feature.

Thanks for the response.

Perhaps a simpler workaround may be to ignore the unresolvable Names, instead of throwing an exception. This behavior is similar to Excel’s.

For the moment I will remove the offending Names.

Nick

Thanks for your suggestion. I will add it in the future version.

Hi Laurence,

I got hit with another open error. The file to open looks innocuous enough. The error message is:
"Source array was not long enough. Check srcIndex and length, and the array’s lower bounds."

I am using the latest version of Aspose.Excel 3.4.4.0; probably another conflict with the Validation, Name Range, etc. pls help check. thanks,

nick

Hi Nick,

Thanks for your report.
Please try this fix.

Hi laurence,

Works great – thanks. You’re the coolest.

nick