Click here to Skip to main content
15,914,409 members
Home / Discussions / C#
   

C#

 
GeneralRe: Serial port communication Pin
t_nedelchev4-Mar-08 22:59
t_nedelchev4-Mar-08 22:59 
GeneralRe: Serial port communication Pin
DaveyM694-Mar-08 23:53
professionalDaveyM694-Mar-08 23:53 
GeneralRe: Serial port communication Pin
t_nedelchev5-Mar-08 0:05
t_nedelchev5-Mar-08 0:05 
GeneralRe: Serial port communication Pin
DaveyM695-Mar-08 0:51
professionalDaveyM695-Mar-08 0:51 
GeneralRe: Serial port communication Pin
t_nedelchev5-Mar-08 1:16
t_nedelchev5-Mar-08 1:16 
GeneralRe: Serial port communication Pin
DaveyM695-Mar-08 1:25
professionalDaveyM695-Mar-08 1:25 
GeneralRe: Serial port communication Pin
t_nedelchev5-Mar-08 1:40
t_nedelchev5-Mar-08 1:40 
GeneralProblem programatically deleting worksheet from excel file Pin
Goalie354-Mar-08 3:38
Goalie354-Mar-08 3:38 
I'm creating an excel file using c# and the ms office object library. In a few circumstances, after I've created a new worksheet tab and filled it with data, I need to go back and delete it, but unfortunately, this isn't working. My system seems to just ignore my delete command. How can I delete a worksheet I just created?

Here's some of my code. This code would delete worksheet #25:
------------------------------------------------
using MSExcel = Microsoft.Office.Interop.Excel;

private MSExcel._Application excel;
private MSExcel._Workbook workbook;
private MSExcel._Worksheet worksheet;
private MSExcel.Sheets sheet;

worksheet = (MSExcel._Worksheet)this.workbook.Worksheets[25];
((MSExcel._Worksheet)worksheet).Delete();
--------------------------------------------------
When I run this code, the program runs through each line but it simply doesn't delete that worksheet. Any idea why?

Thanks in advance.
-Goalie35
GeneralRe: Problem programatically deleting worksheet from excel file Pin
Laddie4-Mar-08 4:53
Laddie4-Mar-08 4:53 
GeneralRe: Problem programatically deleting worksheet from excel file Pin
Goalie354-Mar-08 4:59
Goalie354-Mar-08 4:59 
AnswerRe: Problem programatically deleting worksheet from excel file Pin
jchalfant4-Mar-08 9:11
jchalfant4-Mar-08 9:11 
GeneralRe: Problem programatically deleting worksheet from excel file Pin
Goalie3510-Mar-08 4:05
Goalie3510-Mar-08 4:05 
Questionhow to save and read an office file from SqlServer 2000 with format? Pin
mahmoud wafy4-Mar-08 2:07
mahmoud wafy4-Mar-08 2:07 
GeneralRe: how to save and read an office file from SqlServer 2000 with format? Pin
Giorgi Dalakishvili4-Mar-08 2:24
mentorGiorgi Dalakishvili4-Mar-08 2:24 
QuestionRe: how to save and read an office file from SqlServer 2000 with format? Pin
mahmoud wafy4-Mar-08 2:58
mahmoud wafy4-Mar-08 2:58 
GeneralRe: how to save and read an office file from SqlServer 2000 with format? Pin
Giorgi Dalakishvili4-Mar-08 3:06
mentorGiorgi Dalakishvili4-Mar-08 3:06 
GeneralImport access table to SQL Server database [modified] Pin
new2pgrmg4-Mar-08 1:02
new2pgrmg4-Mar-08 1:02 
QuestionLoading and using image from binary file Pin
eyalbi0074-Mar-08 0:50
eyalbi0074-Mar-08 0:50 
GeneralRe: Loading and using image from binary file Pin
MidwestLimey4-Mar-08 4:12
professionalMidwestLimey4-Mar-08 4:12 
QuestionRe: Loading and using image from binary file Pin
eyalbi0074-Mar-08 4:22
eyalbi0074-Mar-08 4:22 
GeneralRe: Loading and using image from binary file Pin
Guffa4-Mar-08 4:25
Guffa4-Mar-08 4:25 
GeneralDirectX.Capture Pin
schnepfi4-Mar-08 0:46
schnepfi4-Mar-08 0:46 
QuestionListBox Problem Pin
zeeShan anSari4-Mar-08 0:26
zeeShan anSari4-Mar-08 0:26 
GeneralRe: ListBox Problem Pin
Nouman Bhatti4-Mar-08 0:53
Nouman Bhatti4-Mar-08 0:53 
GeneralRe: ListBox Problem Pin
DaveyM694-Mar-08 0:55
professionalDaveyM694-Mar-08 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.