Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I delete a worksheet from the workbook.

Hi everybody,

I'm creating an appliction in the C#. This application is working with
excel. I could do a lot of things there. But I couldn't remove a worksheet
from the workbook. How can I do it
I wrote the following code below:

ApplicationClass ac = new ApplicationClass();
Workbook wb = ac.Workbooks["Book1.xls"];

.... // code

((Worksheet)wb.Sheets["Sheet2"]).Delete();

The "Delete" method doesn't work. What's wrong here? Who knows how I can do
it?

Thank you very much.

--
Sincerely yours,
Michael Tkachev.
..Net Developer


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete a duplicate Excel worksheet within that worksheet? jozawun Excel Discussion (Misc queries) 6 September 19th 06 02:20 PM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
in workbook, where is delete worksheet Teressa Excel Worksheet Functions 5 January 19th 06 11:46 PM
how do I delete a worksheet from my workbook DLee New Users to Excel 2 August 15th 05 09:59 PM
how to protect from insert, delete, resequence worksheet in workbook tango Excel Programming 1 October 18th 04 05:40 AM


All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"