How to print out tabulated data to excel

25 views (last 30 days)
yp78
yp78 on 12 Aug 2018
Edited: yp78 on 18 Aug 2018
Is there any way by which I can export (print) the output of tabulated data? My current code looks like this and returns an error message saying; "Error using xlswrite (line 172) input data must be a numeric, cell, or logical array".
% The "result" is N by 1 double array
C = categorical(result,[2 3 4 5 6],{'Mon','Tue','Wed','Thu','Fri'});
tabulate(C)
% print output
fileName= 'output.xlsx';
sheetName = 'sheet1';
xlswrite(fileName,C,sheetName,'B3');
  3 Comments
yp78
yp78 on 18 Aug 2018
Thanks for your help! It worked and I found each one of your advice helpful.

Sign in to comment.

Answers (1)

KSSV
KSSV on 13 Aug 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!