Deleting a work sheet from excel 2010 file using c# [duplicate]
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#?
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.
精彩评论