adding multiples xlsx sheets in a workbook
10 次查看(过去 30 天)
显示 更早的评论
hello!
After processing my data with Matlab, I have 5 several .xlsx files, each one with 1 sheet.
Now, I want a xlsx workbook with these 5 sheets, conserving the same sheet name for each one.
I've tried with the code attached below, but I can't keep the sheet names of each single file into the excel worbook.
Can you help me?
Thank you very much!
Attached you can find the .xlsx files.
outfile = 'C:\Users\alberto\MATLAB_TRABAJO\prueba matlab\test.xlsx';
for k=1:length(archives)
writetable(Table,outfile,'Sheet',k,'Range','A1','WriteVariableNames',true);
end
%d=dir('*.xlsx');
%for i=1:numel(d)
%xlsheets(extractBetween(d(i).name,'16_','.'),d(i).name);
%end
2 个评论
dpb
2021-4-6
xlsheets(extractBetween(d(i).name,'16_','.'),d(i).name);
what is xlsheets in the above code and explain more clearly what you're trying to accomplish.
You wrote a file with sheets 1 thru 5 that have default name for each by addressing them as numeric.
回答(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!