Generating multiple excel files
Show older comments
Dear members,
I have an excel file named Template.xls. I need to generate n number of excel files having the same content as Template.xls but named: Template1, Template2... Templaten.
How can I do this in MATLAB?
Accepted Answer
More Answers (1)
Oren B
on 10 Nov 2019
0 votes
load patients
data = table(Gender,Smoker,Height,Weight);
number_exsel_file = 3
for n = 1:number_exsel_file
writetable(data, ['Template',num2str(n),'.xls'], 'sheet', 1, 'Range', 'A1')
end
Categories
Find more on Data Import from MATLAB 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!