We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IndexOutOfRangeException is thrown on Save() to SpreadsheetML after InsertColumns()

Hi,



Save() throws an exception on a spreadsheet (attached) only after InsertColumns() is being called and the save format is SpreadsheetML.



What is the reason that this exception is being thrown?



var workbook = new Workbook();

workbook.Open(“c:\InsertColumns_InsertManyColumns.xls”,

FileFormatType.Default);



var grid = workbook.Worksheets[0];



grid.Cells.InsertColumns(5, 5);



grid.Workbook.Save(“c:\InsertColumns_InsertManyColumns.xls”, FileFormatType.SpreadsheetML);



======================



System.IndexOutOfRangeException: Index was outside the bounds of the array.



======================



-Steve

Hi Steve,

Thanks for providing us the template file.

Yes, we found the issue (as you have described) after an initial test, we will figure it out soon.

Thank you.

Hi Steve,

Please try the fix in <A href="https://forum.aspose.com/t/85476</A>.</P> <P>This bug is caused by there are more than 256 columns after inserting columns.We have cleared them if we save it as SpreadML file.</P>

This looks good now … thanks!

The issues you have found earlier (filed as 6782) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Laurence.