How to delete some specific sheets from an existing excel file using code?


I was trying the below code to delete some specific sheets from an excel file but it doesn’t give me the result what I expected. Actually I need to add that code into ‘Invoke vba’ activity in UiPath. Here I have attached all the snapshots of my work. I’m very new to the and need a clarification for the below code.


app = New Microsoft.Office.Interop.Excel.ApplicationClass
workbook= app.Workbooks.Open(filePath)

Catch ex As Exception

End Try