export cell2table to excel
9 views (last 30 days)
Show older comments
Hi, how do I export contents of a cell2table to an excel sheet? do i need to convert to a table first before i can export to excel??
I get the following error statement with my code below. (line 177 is the writable line in the code below)
Undefined function 'write' for input arguments of type 'cell'.
Error in writetable (line 124)
write(a,filename,varargin{:})
Error in data_summary_dat (line 177)
writetable(Summary, filename)
Summary{i,:} = cell2table(data, 'VariableNames', columNames);
xlswrite(filename, Summary)
winopen(filename)
0 Comments
Answers (1)
Peter Perkins
on 20 May 2019
cell2table is a unction that converts a cell array to 1 table. writetable is a function that writes a table to a file.
This
Summary{i,:} = cell2table(...
suggests that you are (maybe???) creating a table by converting a 1-row cell array and assigning to a row of a table? Maybe? There have to be better ways to do whatever it is that you are doing. A short complete simple example would perhaps make it more clear.
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!