Sign In  Sign Up Live-Chat

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

Last post 10-14-2008, 10:52 AM by stung. 3 replies.
Sort Posts: Previous Next
  •  10-10-2008, 5:14 PM 147542

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

    Attachment: Present (inaccessible)
    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
     
  •  10-11-2008, 7:36 AM 147569 in reply to 147542

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

    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. 


    Amjad Sahi
    Support Developer,
    Aspose Nanjing Team
    Contact Us
     
  •  10-13-2008, 5:53 AM 147712 in reply to 147542

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

    Hi Steve,

    Please try the fix in http://www.aspose.com/community/forums/thread/147363/insertcolumns-does-not-update-named-ranges.aspx.

    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.


    Simon Zhao
    Developer
    Aspose Nanjing Team
    Contact Us
     
  •  10-14-2008, 10:52 AM 147894 in reply to 147712

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

    This looks good now .. thanks!
     
View as RSS news feed in XML