MATLAB: Creat a excel file from matlab

excelimporting excel dataMATLAB

I have data that I want to put in a excel file from matlab. the data is coming from a text file that I read in using textscan, here is my sample code:
fileID = fopen('passReport.EO1_2013_107_193146');
c = textscan(fileID, '%s')
fclose(fileID);
data = celldisp(c);
I want to take the data in the variable "data" and create a excel file with it

Best Answer

The "xlswrite" command should do what you need:
help xlswrite
xlswrite allows you to control the file to which your data is written, the sheet within that file to which your data is written, and the specific cells to which your data is written. If a file with the name you provide does not already exist, a new one is created. Very handy function.
Related Question