필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Delete worksheet from Excel

조회 수: 1 (최근 30일)
Santosh Biradar
Santosh Biradar 2022년 8월 8일
마감: dpb 2022년 8월 8일
이 질문에 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

답변 (0개)

이 질문은 마감되었습니다.

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by