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
close icon

Sheets copy

I tried to copy sheets from one workbook to another. In simple code copy process works perfectly, but in my code ExcelRW function throws next Exception: "A first chance exception of type ''System.NullReferenceException'' occurred in syncfusion.excelrw.base.dll Additional information: Object reference not set to an instance of an object." Here is stack trace: syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.WorksheetImpl.UpdateIndexes(System.Collections.ICollection collection = {System.Collections.Hashtable.ValueCollection}, Syncfusion.ExcelRW.Implementation.WorksheetImpl sourceSheet = {Syncfusion.ExcelRW.Implementation.WorksheetImpl}, System.Collections.Hashtable hashStyleNames = {Count=13}) + 0x173 bytes syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.WorksheetImpl.CopyRowHeight(Syncfusion.ExcelRW.Implementation.WorksheetImpl sourceSheet = {Syncfusion.ExcelRW.Implementation.WorksheetImpl}, System.Collections.Hashtable hashStyleNames = {Count=13}) + 0x73 bytes syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.WorksheetImpl.CopyFrom(Syncfusion.ExcelRW.Implementation.WorksheetImpl worksheet = {Syncfusion.ExcelRW.Implementation.WorksheetImpl}, System.Collections.Hashtable hashStyleNames = {Count=13}, System.Collections.Hashtable hashWorksheetNames = , Syncfusion.ExcelRW.ExcelWorksheetCopyFlags flags = CopyWithoutNames) + 0x5f bytes syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.Collections.WorksheetsCollection.AddCopy(Syncfusion.ExcelRW.IWorksheets worksheets = {Syncfusion.ExcelRW.Implementation.Collections.WorksheetsCollection}) + 0x23b bytes >My Cool Functions Any ideas?

3 Replies

AD Administrator Syncfusion Team September 13, 2005 08:56 AM UTC

Hi Shwarzenegger, I would appreciate it, if you could send the spreadsheet with the worksheet you are trying to copy. It will help us to investigate and give exact solution. If you wish to maintain the confidentiality of your spreadsheet, please create a Direct-Trac incident in this regard and mention the link to this forum post. Best Regards, Seetha >I tried to copy sheets from one workbook to another. In simple code copy process works perfectly, but in my code ExcelRW function throws next Exception: > >"A first chance exception of type ''System.NullReferenceException'' occurred in syncfusion.excelrw.base.dll > >Additional information: Object reference not set to an instance of an object." > >Here is stack trace: > >syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.WorksheetImpl.UpdateIndexes(System.Collections.ICollection collection = {System.Collections.Hashtable.ValueCollection}, Syncfusion.ExcelRW.Implementation.WorksheetImpl sourceSheet = {Syncfusion.ExcelRW.Implementation.WorksheetImpl}, System.Collections.Hashtable hashStyleNames = {Count=13}) + 0x173 bytes > >syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.WorksheetImpl.CopyRowHeight(Syncfusion.ExcelRW.Implementation.WorksheetImpl sourceSheet = {Syncfusion.ExcelRW.Implementation.WorksheetImpl}, System.Collections.Hashtable hashStyleNames = {Count=13}) + 0x73 bytes > >syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.WorksheetImpl.CopyFrom(Syncfusion.ExcelRW.Implementation.WorksheetImpl worksheet = {Syncfusion.ExcelRW.Implementation.WorksheetImpl}, System.Collections.Hashtable hashStyleNames = {Count=13}, System.Collections.Hashtable hashWorksheetNames = , Syncfusion.ExcelRW.ExcelWorksheetCopyFlags flags = CopyWithoutNames) + 0x5f bytes > syncfusion.excelrw.base.dll!Syncfusion.ExcelRW.Implementation.Collections.WorksheetsCollection.AddCopy(Syncfusion.ExcelRW.IWorksheets worksheets = {Syncfusion.ExcelRW.Implementation.Collections.WorksheetsCollection}) + 0x23b bytes > >>My Cool Functions > >Any ideas?


AD Administrator Syncfusion Team September 14, 2005 04:58 AM UTC

Hi Seetha, I put the zip file of simple project that must demonstrate the problem. This code shows the same problems that appears in my big project. The stack trace is the same. ExcelRWProblems_9731.zip


AD Administrator Syncfusion Team September 14, 2005 10:38 AM UTC

Hi Shwarzenegger, I was able to see the issue and its already a Bug. We have already filed a bug report with the Developement team. Defect #552 - AddCopy does not work properly when copying multiple times Sorry for the inconvenience. Thanks, Seetha >Hi Seetha, I put the zip file of simple project that must demonstrate the problem. This code shows the same problems that appears in my big project. The stack trace is the same. > > >ExcelRWProblems_9731.zip > >

Loader.
Live Chat Icon For mobile
Up arrow icon