0

I need to delete only 3 certain tabs in an excel. There any batch command for that. I can't find any solution on google.

I tried below but doesn't work-

@echo off @del /s /q /f "C:\Excel.xlsm|||Sheet1"

1 Answer 1

1

You cannot delete a sheet in a book directly with a batch file.

You can use a batch file to open a new workbook and then use a Macro to delete the sheet(s) in the other book.

Delete sheet

Sub Delete_Sheet() Sheets("Sheet2").Delete ‘Or Sheet2.Delete End Sub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .