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!