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"
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityYou 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.
Sub Delete_Sheet() Sheets("Sheet2").Delete ‘Or Sheet2.Delete End Sub