Possible Duplicate:
.Net Excel Interop Deleting a worksheet
I have an EXCEL file in my C drive.How can i delete one of the work sheet from that file using c#?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can interop with Excel by adding the Microsoft.Office.Interop library to your project. You can access the worksheets through a workbook object and call delete on a specified index. Also, remember to do some cleaning up afterwards. I find that Excel likes to linger in the background after the program is done running if not handled properly.