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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Delete Worksheet Problem

Thread ID:

Created:

Updated:

Platform:

Replies:

20341 Oct 14,2004 10:08 AM Oct 19,2004 11:20 AM Windows Forms 5
loading
Tags: XlsIO
Administrator [Syncfusion]
Asked On October 14, 2004 10:08 AM

Hi, I received a System.NullReferenceException from the excelrw.dll when I called myWorkBook.Worksheets.Remove("Sheet1"). I checked the active workbook and confirmed it has the worksheet - "Sheet1". Any ideas or suggestions? Thanks in advance.

Administrator [Syncfusion]
Replied On October 14, 2004 11:24 AM

Hi, Could you please post your sample or the code snippet that you are using and also the version of ExcelRW that you are using. Thanks. Best regards, Stephen. >Hi, > >I received a System.NullReferenceException from the excelrw.dll when I called myWorkBook.Worksheets.Remove("Sheet1"). I checked the active workbook and confirmed it has the worksheet - "Sheet1". > >Any ideas or suggestions? > >Thanks in advance.

Administrator [Syncfusion]
Replied On October 14, 2004 11:34 AM

Thanks for the quick reply. Belows are the code that I used for testing the Remove method: public void TestWorkBook () { // Create a workbook with 2 worksheets IWorkbook myWorkBook = ExcelUtils.CreateWorkbook(2); // Delete the first worksheet // I received exception as soon as I call the Remove method myWorkBook.WorkSheets.Remove("Sheet1"); } My ExcelRW version number is 1.1.4322 Thanks again. >Hi, > >Could you please post your sample or the code snippet that you are using and also the version of ExcelRW that you are using. Thanks. > >Best regards, > >Stephen. > > >>Hi, >> >>I received a System.NullReferenceException from the excelrw.dll when I called myWorkBook.Worksheets.Remove("Sheet1"). I checked the active workbook and confirmed it has the worksheet - "Sheet1". >> >>Any ideas or suggestions? >> >>Thanks in advance.

Administrator [Syncfusion]
Replied On October 14, 2004 03:05 PM

Hi, I tried to reproduce the problem using this sample with the code snippet that you had provided but it seems to work fine for me. F20341DeleteWorksheet_5280.zip Please take a look at the attached sample and let me know if you see the problem in this sample also. Could you please confirm the version of ExcelRW since the latest version available for download is version 2.1.0.9 and we did not have the version number that you have specified. One other thing you can look for is to make sure that the spelling of sheet1 is case sentitive it should be ''Sheet1'' and not ''sheet1''. Thanks. Best regards, Stephen. >Thanks for the quick reply. > >Belows are the code that I used for testing the Remove method: > >public void TestWorkBook () >{ >// Create a workbook with 2 worksheets >IWorkbook myWorkBook = ExcelUtils.CreateWorkbook(2); > >// Delete the first worksheet >// I received exception as soon as I call the Remove method >myWorkBook.WorkSheets.Remove("Sheet1"); >} > >My ExcelRW version number is 1.1.4322 > >Thanks again. > > >>Hi, >> >>Could you please post your sample or the code snippet that you are using and also the version of ExcelRW that you are using. Thanks. >> >>Best regards, >> >>Stephen. >> >> >>>Hi, >>> >>>I received a System.NullReferenceException from the excelrw.dll when I called myWorkBook.Worksheets.Remove("Sheet1"). I checked the active workbook and confirmed it has the worksheet - "Sheet1". >>> >>>Any ideas or suggestions? >>> >>>Thanks in advance.

Administrator [Syncfusion]
Replied On October 15, 2004 06:42 AM

Hi, Here is my testing results. The sample works fine with ExcelRW ver. 2.0.5.1. However, I received the same exception if I used ExcelRW ver. 2.0.5.43. Thanks >Hi, > >I tried to reproduce the problem using this sample with the code snippet that you had provided but it seems to work fine for me. > >F20341DeleteWorksheet_5280.zip > >Please take a look at the attached sample and let me know if you see the problem in this sample also. > >Could you please confirm the version of ExcelRW since the latest version available for download is version 2.1.0.9 and we did not have the version number that you have specified. > > >One other thing you can look for is to make sure that the spelling of sheet1 is case sentitive it should be ''Sheet1'' and not ''sheet1''. >Thanks. > >Best regards, > >Stephen. >>Thanks for the quick reply. >> >>Belows are the code that I used for testing the Remove method: >> >>public void TestWorkBook () >>{ >>// Create a workbook with 2 worksheets >>IWorkbook myWorkBook = ExcelUtils.CreateWorkbook(2); >> >>// Delete the first worksheet >>// I received exception as soon as I call the Remove method >>myWorkBook.WorkSheets.Remove("Sheet1"); >>} >> >>My ExcelRW version number is 1.1.4322 >> >>Thanks again. >> >> >>>Hi, >>> >>>Could you please post your sample or the code snippet that you are using and also the version of ExcelRW that you are using. Thanks. >>> >>>Best regards, >>> >>>Stephen. >>> >>> >>>>Hi, >>>> >>>>I received a System.NullReferenceException from the excelrw.dll when I called myWorkBook.Worksheets.Remove("Sheet1"). I checked the active workbook and confirmed it has the worksheet - "Sheet1". >>>> >>>>Any ideas or suggestions? >>>> >>>>Thanks in advance. > > > >

Administrator [Syncfusion]
Replied On October 19, 2004 11:20 AM

Hi, I tested with the latest internal patch and it works fine. Could you please consider upgrading to version 2.1 of ExcelRW since it has a lot of improvements over version 2.0.5.43. Thanks. Best regards, Stephen. >Hi, > >Here is my testing results. > >The sample works fine with ExcelRW ver. 2.0.5.1. However, I received the same exception if I used ExcelRW ver. 2.0.5.43. > >Thanks > > >>Hi, >> >>I tried to reproduce the problem using this sample with the code snippet that you had provided but it seems to work fine for me. >> >>F20341DeleteWorksheet_5280.zip >> >>Please take a look at the attached sample and let me know if you see the problem in this sample also. >> >>Could you please confirm the version of ExcelRW since the latest version available for download is version 2.1.0.9 and we did not have the version number that you have specified. >> >> >>One other thing you can look for is to make sure that the spelling of sheet1 is case sentitive it should be ''Sheet1'' and not ''sheet1''. >>Thanks. >> >>Best regards, >> >>Stephen. >>>Thanks for the quick reply. >>> >>>Belows are the code that I used for testing the Remove method: >>> >>>public void TestWorkBook () >>>{ >>>// Create a workbook with 2 worksheets >>>IWorkbook myWorkBook = ExcelUtils.CreateWorkbook(2); >>> >>>// Delete the first worksheet >>>// I received exception as soon as I call the Remove method >>>myWorkBook.WorkSheets.Remove("Sheet1"); >>>} >>> >>>My ExcelRW version number is 1.1.4322 >>> >>>Thanks again. >>> >>> >>>>Hi, >>>> >>>>Could you please post your sample or the code snippet that you are using and also the version of ExcelRW that you are using. Thanks. >>>> >>>>Best regards, >>>> >>>>Stephen. >>>> >>>> >>>>>Hi, >>>>> >>>>>I received a System.NullReferenceException from the excelrw.dll when I called myWorkBook.Worksheets.Remove("Sheet1"). I checked the active workbook and confirmed it has the worksheet - "Sheet1". >>>>> >>>>>Any ideas or suggestions? >>>>> >>>>>Thanks in advance. >> >> >> >>

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.

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

;