how to clear content of a sheet in excel

5 次查看(过去 30 天)
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

回答(1 个)

Jash Kadu
Jash Kadu 2022-7-14
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

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by