How to Write Output Figure with Table inside to Excel
1 次查看(过去 30 天)
显示 更早的评论
I have an image output with a table on my code:
I am trying to export this result to an excel file which I create each save with figure and results table.
Could anyone assist on the issue?
I have already tried below:
writetable(table(result), 'Result.xlsx', 'WriteVariableNames', true) xlswritefig(gcf, 'Results.xlsx', 'Sheet1', 'D2')
This gave the error which indicates excel is not able to be created and much more.
6 个评论
回答(1 个)
ANKUR KUMAR
2018-10-8
"I have an image output with a table on my code"
You can directly write this table in excel using xlswrite.
A=randi(10,5,6) %load your table in place of this command
xlswrite('sample.xlsx',A)
If you specifically wish to start writing with specific sheet and cell, then use this
xlswrite('sample.xlsx',A,'sheet1','A1')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!