We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

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

Hi,

I'm trying to convert a xlsx file to pdf, but it keeps crashing with the error message "Index was out of range. Must be non-negative and less than the size of the collection".

I add a small application sample, and besides the full Visual Studio 2013 project, I added two files "book.xlsx" which is empty, and  "Sample.xlsx" which does have data, and this is the file I'm trying to convert.

So I can convert one file "book.xlsx" without any problem, even if I add some data, but "Sample.xlsx" fails.

I can't find the culprit for the exception message.

Thanks,
Isidro



Attachment: ConsoleApplication3_25c51e6a.zip

5 Replies

PM Prasanth M Syncfusion Team August 4, 2014 08:34 AM UTC

Hi Isidro, 

Thank you for using Syncfusion products. 

The reported issue has been fixed in our latest version 12.1.0.36 along with other major enhancements. So, we strongly recommend you to upgrade to the latest version to get the issue resolved.

Release information: https://www.syncfusion.com/support/forums/announcements/116964

Please let us know if you need any clarification.

Thanks,
Prasanth



IG Isidro Goncalves August 5, 2014 08:59 AM UTC

Thanks Prasanth, I updated to that version, and the application was able to convert the file, but only to find out another problem, that the header columns height is not being respect, and I end up with a pdf that only show two letters from each column.

I attached the project, and you can see the file "ExceltoPDF", the header columns only have two letters, while the excel (Sample.xlsx) show the entire header column name.

Best regards,
Isidro

Attachment: ConsoleApplication3_fd724837.zip


PM Prasanth M Syncfusion Team August 6, 2014 10:51 AM UTC

Hi Isidro,

We are able to reproduce this issue and we have logged an issue report on this. As per our forum regulation, we will not be able to share the fix for the issue through forum. However, if you are interested in receiving this fix then, we would request you to use our Direct-Trac Support system to get the fix for this issue and resolve all your technical queries. For more details, please login into http://www.syncfusion.com/Account/ and we will be happy to help you. Please let us know in case of any queries.

Regards,
Prasanth


IG Isidro Goncalves August 6, 2014 11:14 AM UTC

Thank you Prasanth, I'll use Direct-Trac Support system in order to create a ticket about this issue.

Best regards,
Isidro


PM Prasanth M Syncfusion Team August 7, 2014 05:49 AM UTC

Hi Isidro,

Thank you for updating us.

Please let us know if you need any clarification.

Regards,
Prasanth

Loader.
Live Chat Icon For mobile
Up arrow icon