Save multiple doubles in different sheets of one excel file
12 views (last 30 days)
Show older comments
I have different data, each of them are class doubles and have size (300 x 4). How can I save all of them in different sheets of one excel file? I would also like to name every column in every sheet. I had the following in mind, but open to other codes/ways that work.
example of doubles that i have
my_data: size (300 x 4)
your_data : size (300 x 4)
her_data: size (300 x 4)
% example
col_names = {'MA', 'CA', 'PA', 'TL'} % the first row will name every column with these names in every sheet
data_names = {'my_data', 'your_data', 'her_data'} % each are doubles of dimesnion (300 x 4)
for i = length(data_names)
writetable(..,..,'Combined_Data.xlsx','Sheet',strcat(i))
end
8 Comments
Answers (0)
See Also
Categories
Find more on Logical 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!