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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unable to Save Workbook

Thread ID:

Created:

Updated:

Platform:

Replies:

51320 Nov 2,2006 07:21 PM UTC Nov 6,2006 12:22 PM UTC WinForms 3
loading
Tags: XlsIO
Ken
Asked On November 2, 2006 07:21 PM UTC

I'm evaluating XlsIO for our company and am using version 4.3.0.30. I'm getting the following error when saving a worksheet.

System.ApplicationException: Error in the application.
at Syncfusion.XlsIO.Implementation.Collections.WorkbookNamesCollection.GetNewIndexes(SortedListEx list)
at Syncfusion.XlsIO.Implementation.Collections.WorkbookNamesCollection.Serialize(OffsetArrayList records)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.Serialize(OffsetArrayList records, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(String FileName, ExcelSaveType saveType)
at SFTest1.SFTest1.btnTestXLSSave_Click(Object sender, EventArgs e) in c:\kla\excel\sftest1\sftest1.cs:line 126


The code I'm using is:

private void btnTestXLSSave_Click(object sender, System.EventArgs e) {
Cursor.Current = Cursors.WaitCursor;
try {
IWorkbook workBook = null;
try {
ExcelUtils.ThrowNotSavedOnDestroy = false;
workBook = ExcelUtils.Open( @"C:\annablek\_scratch\MOF Transition Template.xls" );

foreach( IWorksheet sheet in workBook.Worksheets ) {
Log( String.Format( "{0}: {1}", sheet.Index, sheet.Name) );
}
Log( "----------" );
IWorksheet sht1 = workBook.Worksheets["ACS"];
workBook.Worksheets.Remove( sht1 );

foreach( IWorksheet sheet in workBook.Worksheets ) {
Log( String.Format( "{0}: {1}", sheet.Index, sheet.Name) );
}
workBook.SaveAs( @"c:\annablek\_scratch\MOF1.xls", ExcelSaveType.SaveAsXLS );
} finally {
workBook.Close( false );
workBook = null;
}
} catch( Exception ex ) {
Log( ex );
} finally {
Cursor.Current = Cursors.Default;
}
}

The workBook.SaveAs statement is line 126. The Excel file is 8055KB in size and contains 88 worksheets. The code is removing worksheet 48. Am I doing something wrong? Thanks.

Melba Winshia [Syncfusion]
Replied On November 3, 2006 11:29 AM UTC

Hi Ken,

Thank you for your interest in Essential XlsIO.

I am afraid. I was unable to reproduce the issue. I used the following test sample to test your issue.

Sample :
SavingWorkbook.zip


Could you please provide me your sample xls file in which you are able to reproduce the issue? It will help me in investigating further on this issue.

Thanks,
Melba


Ken
Replied On November 6, 2006 11:33 AM UTC

Melba,

I was able to successfully open, delete a worksheet, and save when I used the Sample.xls you sent. Attached is the spreadsheet that is causing the error. Thanks.

Ken

> Hi Ken,

Thank you for your interest in Essential XlsIO.

I am afraid. I was unable to reproduce the issue. I used the following test sample to test your issue.

Sample :
SavingWorkbook.zip


Could you please provide me your sample xls file in which you are able to reproduce the issue? It will help me in investigating further on this issue.

Thanks,
Melba



MOF Transition Template.zip

Melba Winshia [Syncfusion]
Replied On November 6, 2006 12:22 PM UTC

Hi Ken,

I was able to reproduce the problem. I have created a bug report regarding this issue; you can track the status of this issue from the following link:

http://www.syncfusion.com/support/issues/xlsio/Default.aspx?ToDo=view&questId=2976

We will try to address this issue as soon as possible. Sorry for the inconvenience.

Thanks,
Melba

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;