writetable to (.xlsx file) blank output
8 views (last 30 days)
Show older comments
Adel Monette Rivera
on 28 Feb 2019
Commented: Alex Mcaulley
on 1 Mar 2019
I have a Table compose of string names (about 130+ names). Only 1 column.
BUT my excel file is Blank. no errors or warnings. just the output is BLANK.
please, can someone explain.
data=table;
f=fieldnames(data);
for k=1:size(f,1)
xlswrite('name.xlsx',data.(f{k}),f{k})
end
%also tried this code: writetable(table,'name.xls','Sheet',2)

0 Comments
Accepted Answer
Alex Mcaulley
on 28 Feb 2019
Apparently writetable(table,'name.xls','Sheet',2) should work.
I think the problem is the name of the variable, table is a matlab function that gives an empty table. Try changing the name of the variable.
8 Comments
More Answers (0)
See Also
Categories
Find more on Tables 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!