How to Convert MAT to XLS

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

A file with a ".mat" extension is a binary data file commonly used by MATLAB applications. This file may include arrays, variables, functions and other types of data. A file with the ".xls" extension is a spreadsheet commonly used by Microsoft Excel applications in which data is stored in a table with rows and columns. Users can convert a ".mat" file to ".xls" from the MATLAB application in order to be able to read their data on any computer containing Microsoft Excel. It is easier to transfer ".xls" files through email because their size is less than the ".mat" files by a significant amount.

Advertisement

Step 1

Double-click the MATLAB application icon from your desktop to open the program. If the icon is not available on your desktop, open the MATLAB application link from "Start," "Programs," "MATLAB" and "MATLAB x," where x stands for the application's version number.

Advertisement

Video of the Day

Step 2

Type the command "load NewFile" in the command window and press the "Enter" key, where "NewFile" is the name of the ".mat" file you wish to convert to an ".xls" file. This command will load the contents of the ".mat" file and store them in MATLAB application's memory.

Advertisement

Step 3

Type the command "xlswrite('NewExcelFile.xls', 'NewFile')" in the command window and press the "Enter" key, where "NewExcelFile.xls" is the Microsoft Excel file in which you want the data from the ".mat" file to be saved.

Advertisement

Step 4

Double-click the "My Computer" icon from your desktop and browse to the folder location where the ".mat" file is stored. Check the folder to see if a file called "NewExcelFile.xls" is created. Double-click the "NewExcelFile.xls" file to open it with Microsoft Excel.

Video of the Day

Advertisement

Advertisement

references