help xlswrite:
help xlswrite
XLSWRITE Stores numeric array or cell array in Excel workbook.
[SUCCESS,MESSAGE]=XLSWRITE(FILE,ARRAY,SHEET,RANGE) writes ARRAY to the Excel
workbook, FILE, into the area, RANGE in the worksheet specified in SHEET.
FILE and ARRAY must be specified. If either FILE or ARRAY is empty, a
error is thrown and XLSWRITE terminates. The first worksheet of the
workbook is the default. If SHEET does not exist, a new sheet is added at
the end of the worksheet collection. If SHEET is an index larger than the
number of worksheets, new sheets are appended until the number of worksheets
in the workbook equals SHEET. The size defined by the RANGE should fit the
size of ARRAY or contain only the first cell, e.g. 'A2'. If RANGE is larger
than the size of ARRAY, Excel will fill the remainder of the region with
#N/A