MATLAB: How to delete default excel sheets when using writetable function (mac)

excelsheetswritetable

When using the writetable function to add several different sheets, excel generates default (blank) excel sheets at the beginning of the document. I currently am working off a mac computer and thus cannot use the actxserver solutions described in other posts.
writetable(T,filename,'sheet','sheet_name');

Best Answer

Mathworks does not offer any way to do this.
This question was recently explored in the context of someone who was providing sheet names, and was ending up with 3 extra sheets with default names. Someone (dbp I think it was) indicated that when Excel is asked to create a workbook, that it automatically adds the first sheet, and so for compatibility with Excel the first useless sheet is generated. We did not, however, see any good reason for the code to automatically generate sheet2 and sheet3.