MATLAB: Headings in excel

excel

I was wondering if anyone knows how to make column headings using xlswrite function. I tried making a string array that would precede the data, but in the .xls file xlswrite function would expand every character in the string into individual cells, rather than the entire string in one cell to act as the column title. If anyone knows how to have the string, act like a number so that they can be added into the excel in one cell, I would really appreciate it.
– thanks

Best Answer

Figured it out for myself so if anyone wants to put column titles here:
C = java_array('java.lang.String',4);
C(1) = java.lang.String('Apple');
C(2) = java.lang.String('Bear');
C(3) = java.lang.String('Cat');
C(4) = java.lang.String('Dog');
T = cell(C)
xlswrite(filenameA,T',1,'A1')