MATLAB: Writing multiples values of different data types in excel

xlswrite

Hello.
I wish to create a table shown below using xlswrite command. Is there any way to achieve this using xlswrite only once (or minimum number of times) since it takes a lot of time?

Best Answer

Yes. You'd have to make up a cell array with all those things in the proper row,column location of the cell array, and then write it once. For example:
ca{1, 3} = 'Classes';
ca{1, 4} = 'W';
% etc.
xlswrite(excelfileName, ca, 'Results', 'A1');