Exporting workspace variables in excel sheet
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I have 200 variables in my matlab workspace. how can I export this data into the excel sheet as it is in matlab ?
Variable names should be the headers in the excel sheet.
Thanks in advance !
回答(1 个)
Ameer Hamza
2020-10-16
As Stephen mentioned, creating variable names dynamically is not a good coding practice. A better approach will be to create a table(), and column names can be the same as variable names. Then you can simply use writetable() and it will print variable name as the header row of the Excel sheet.
1 个评论
Stephen23
2020-10-16
"...creating variable names dynamically is not a good coding practice."
Also accessing them dynamically, as in this question.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!