Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Delete worksheet from Excel

1 visualizzazione (ultimi 30 giorni)
Santosh Biradar
Santosh Biradar il 8 Ago 2022
Chiuso: dpb il 8 Ago 2022
Questo/a domanda è stato/a segnalato/a da dpb
Hello
I have tried below
In the main code,
%%Value of newidx = "AAA" i,e, Excel Sheet Name
%% Value of excelName1 = D:\SANTOSH\Task2\Aug\NewSfun_SummaryResult\ABC.xlsx
After calling DeleteExcelSheets(excelName1, newidx) in the script.
I am expecting the sheet has to be deleted from theat excelName1.
function DeleteExcelSheets(excelName1, newidx)
try
Excel = actxserver('Excel.Application');
Workbooks = Excel.Workbooks;
Workbook = Workbooks.Open(excelName1);
Sheets = Excel.ActiveWorkBook.Sheets;
Sheets.Item(newidx).Delete;
end
Thank you

Risposte (0)

Questa domanda è chiusa.

Prodotti


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by