The file extension you provide as part of filename argument to XLSWRITE determines the Excel format that xlswrite uses for the new file. An extension of .xls creates a worksheet compatible with Excel 97-2003 software. Use extensions .xlsx, .xlsb, or .xlsm to create worksheets in Excel 2007 file formats.
For example, to create a .xls file compatible with Microsoft Excel 97-2003, the following XLSWRITE call may be used:
On the other hand, to create a .xlsx file for use with Microsoft Excel 2007, the following may be uased:
If you are using Microsoft Excel 2010, you can do the same starting with MATLAB R2010b (7.11).
Best Answer