MATLAB: How to insert multiple spreadsheets to a workbook from Matlab

insert sheetsMATLAB

Matlab provide a method to insert one spreadsheet: using the command
eNewSheet = Add(eSheets,[],eSheet1);
However, if I know I need to add multiple spreadsheets, e.g. 5, is there a way to tell Add comment, or I have to do a for loop to insert 5 sheets?
Thanks

Best Answer

You can add the number of sheets as an extra argument. So, for 5 sheets:
eNewSheet = Add(eSheets,[],eSheet1,5);