Naming sheets with xlswrite
37 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
kionstan
am 19 Jul. 2019
Beantwortet: kionstan
am 19 Jul. 2019
Naming sheets with xlswrite. As simple as that. I cannot find the way.
Thank you!
0 Kommentare
Akzeptierte Antwort
Guillaume
am 19 Jul. 2019
xlswrite(filename,A,sheet) writes to the specified worksheet.
4 Kommentare
Guillaume
am 19 Jul. 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;
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!