Naming sheets with xlswrite
25 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Naming sheets with xlswrite. As simple as that. I cannot find the way.
Thank you!
0 Commenti
Risposta accettata
Guillaume
il 19 Lug 2019
xlswrite(filename,A,sheet) writes to the specified worksheet.
4 Commenti
Guillaume
il 19 Lug 2019
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;
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!