When a new Excel file is created (whether using Matlab or Excel), it always contains 3 defaults sheets. Their names are depended on the language Excel is defined. In English, it's "sheet1", "sheet2" and "sheet3".
It is useless when writing (with XLSWRITE) to a specific sheet.
This function remove those sheets, regardless of their contents.
The code is based on Jiro Doke's answer (link below), and built-in Matlab functions.
Noam Greenboim (2021). RemoveSheet123 - remove default Excel sheets (https://www.mathworks.com/matlabcentral/fileexchange/50371-removesheet123-remove-default-excel-sheets), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!