how to clear content of a sheet in excel

6 visualizzazioni (ultimi 30 giorni)
Nan Shen
Nan Shen il 6 Mar 2012
Risposto: Jash Kadu il 14 Lug 2022
Code is here:
Excel = actxserver('Excel.Application');
set(Excel, 'Visible', 1);
book = invoke(Excel.Workbooks,'Open',fileName);
curSheet = Excel.ActiveWorkbook.Sheets;
Sheets = Excel.Worksheets;
Rsheet = get(Sheets, 'Item', 'Result');
invoke(Rsheet, 'Activate');
Rsheet.Cells.Clear

Risposte (1)

Jash Kadu
Jash Kadu il 14 Lug 2022
Hi!
Please find the attached documentation :
You can also go through examples in them.
You can also go through the MATLAB answer : https://www.mathworks.com/matlabcentral/answers/42312-excel-clearing-sheet-content?s_tid=answers_rc1-2_p2_MLT

Categorie

Scopri di più su Install Products in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by