Naming sheets with xlswrite
25 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Guillaume
2019 年 7 月 19 日
xlswrite(filename,A,sheet) writes to the specified worksheet.
4 件のコメント
Guillaume
2019 年 7 月 19 日
No, if the workbook doesn't exist already xlswrite will typically create it with 3 worksheets named 'Sheet1' to 'Sheet3'. This can be reduced to just one sheet in the options of excel but excel does not allow the creation of workbooks without any sheet.
You can delete that worksheet afterward with the COM interface:
excel = actxserver('Excel.Application');
excel.DisplyAlerts = false;
workbook = excel.Workbooks.Open('fullpathtotheexcelfile.xlsx');
workbook.Worksheets.Item('Sheet1').Delete;
workbook.Save;
excel.Quit;
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!