writetable/readtable with multi-line headers
How can I use writetable to make a table to excel sheet and .csv file which has multi-line headers. Headers can include both per-variable headers like units and description, but also per-table headers like description or comments.
For example, take a table like below.
T = table(["Blue";"Red";"Green"],[50;100;75],[0.1;0.5;0.9],…
VariableNames={‘Color’,’Weight’,’Temp’});
T.Properties.VariableUnits = ["[-]";"[kg]";"°C"];
T.Properties.VariableDescriptions = ["Outside Color";"Gross Weight";"Melting Point"];
T.Properties.Description = "Playdough Properties Chart";
Now I want to make it look like this in excel and .csv files
I know to do this by other means, but I would like to be able to do it with writetable, and also to read it back in with readtable.
Is there a straight-forward way of doing this?How can I use writetable to make a table to excel sheet and .csv file which has multi-line headers. Headers can include both per-variable headers like units and description, but also per-table headers like description or comments.
For example, take a table like below.
T = table(["Blue";"Red";"Green"],[50;100;75],[0.1;0.5;0.9],…
VariableNames={‘Color’,’Weight’,’Temp’});
T.Properties.VariableUnits = ["[-]";"[kg]";"°C"];
T.Properties.VariableDescriptions = ["Outside Color";"Gross Weight";"Melting Point"];
T.Properties.Description = "Playdough Properties Chart";
Now I want to make it look like this in excel and .csv files
I know to do this by other means, but I would like to be able to do it with writetable, and also to read it back in with readtable.
Is there a straight-forward way of doing this? How can I use writetable to make a table to excel sheet and .csv file which has multi-line headers. Headers can include both per-variable headers like units and description, but also per-table headers like description or comments.
For example, take a table like below.
T = table(["Blue";"Red";"Green"],[50;100;75],[0.1;0.5;0.9],…
VariableNames={‘Color’,’Weight’,’Temp’});
T.Properties.VariableUnits = ["[-]";"[kg]";"°C"];
T.Properties.VariableDescriptions = ["Outside Color";"Gross Weight";"Melting Point"];
T.Properties.Description = "Playdough Properties Chart";
Now I want to make it look like this in excel and .csv files
I know to do this by other means, but I would like to be able to do it with writetable, and also to read it back in with readtable.
Is there a straight-forward way of doing this? tables, csv, excel MATLAB Answers — New Questions