Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Save Excel Workbook error
posted

Hello!

Im trying to add new sheet in existing Excel file. Excel file has set password to modify. It isnt working only on one pc right now. Any ideas what could be wrong? Im using Infragistic 15.1.20151.2179 version.

Message: Unable to cast object of type 'Infragistics.Documents.Excel.Workbook' to type 'Infragistics.Documents.Excel.Serialization.WorksheetReference'.
Stack stack: at Infragistics.Documents.Excel.Serialization.BIFF8.BiffRecords.EXTERNNAMERecord.Save(WorkbookSaveManagerExcel2003 saveManager)
at Infragistics.Documents.Excel.Serialization.WorkbookSaveManagerExcel2003.WriteRecord(BIFF8RecordType type)
at Infragistics.Documents.Excel.Serialization.WorkbookSaveManagerExcel2003.WriteExternalReferences()
at Infragistics.Documents.Excel.Serialization.WorkbookSaveManagerExcel2003.WriteWorkbookGlobals()
at Infragistics.Documents.Excel.Serialization.WorkbookSaveManagerExcel2003.SaveCore()
at Infragistics.Documents.Excel.Serialization.WorkbookSaveManager.<>c__DisplayClassb.<Save>b__9()
at Infragistics.Documents.Core.Async.Try(Func`1 try, Action finally)
at Infragistics.Documents.Excel.Serialization.WorkbookSaveManager.Save()
at Infragistics.Documents.Excel.Workbook.<>c__DisplayClass43.<>c__DisplayClass45.<SaveBIFF8File>b__41(WorkbookSaveManagerExcel2003 saveManager)
at Infragistics.Documents.Core.Async.UsingHelper`1.<Execute>b__a()
at Infragistics.Documents.Core.Async.Try(Func`1 try, Action finally)
at Infragistics.Documents.Core.Async.UsingHelper`1.Execute()
at Infragistics.Documents.Excel.Workbook.<>c__DisplayClass43.<>c__DisplayClass45.<SaveBIFF8File>b__40(Stream workbookStream)
at Infragistics.Documents.Core.Async.UsingHelper`1.<Execute>b__a()
at Infragistics.Documents.Core.Async.Try(Func`1 try, Action finally)
at Infragistics.Documents.Core.Async.UsingHelper`1.Execute()
at Infragistics.Documents.Excel.Workbook.<>c__DisplayClass43.<SaveBIFF8File>b__3f(StructuredStorageManager structuredStorageManager)
at Infragistics.Documents.Core.Async.UsingHelper`1.<Execute>b__a()
at Infragistics.Documents.Core.Async.Try(Func`1 try, Action finally)
at Infragistics.Documents.Core.Async.UsingHelper`1.Execute()
at Infragistics.Documents.Excel.Workbook.SaveBIFF8File(Stream stream, WorkbookSaveOptions saveOptions)
at Infragistics.Documents.Excel.Workbook.SaveHelper(Stream stream, WorkbookSaveOptions saveOptions)
at Infragistics.Documents.Excel.Workbook.Save(String fileName, WorkbookSaveOptions saveOptions)
at frmReport.WriteToExcel()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Target site: Void Save(Infragistics.Documents.Excel.Serialization.WorkbookSaveManagerExcel2003)