GUIDE uitable saved to excel WITH column headings
1 回表示 (過去 30 日間)
古いコメントを表示
Whats the best way to save a GUIDE uitable to an excel file. The uitable consists of doubles and I need to include the headings in the excel file. I used to use xlswrite but the documentation suggest to use writematrix or write table but i cannot get the headings. I would also need to be able to then read in the excel data as well as the headings.
Thanks
Jason
3 件のコメント
Jalaj Gambhir
2019 年 10 月 16 日
In the example cited in the above link, writecell works correctly as well, because 'CombData' is a cell array (the reason why writematrix and writetable does not work). You can combine your column headings (character data) and double data in a cell array, and you can use writecell.
LastName = {'Smith';'Johnson';'Williams';'Jones';'Brown'};
Age = [38;43;38;40;49];
Height = [71;69;64;67;64];
Weight = [176;163;131;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
T = table(LastName,Age,Height,Weight,BloodPressure);
writetable(T,'myData.xls');
Using the above example you can create headings as the variable names such as LastName, Age, etc.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!