How to change the filename in xlswrite using loop
27 views (last 30 days)
Prakhar Modi on 19 Dec 2019
now I am writing the one .xlsx file with 19 sheets. For which my code is working properly. This is what I am written till now
Now what actually I want is that I need to write my answers in for different xlsx sheets. Means for every one input sheet I will get one xlsx file with 19 sheets. So, how can I change the filename with a different for loop so that for every different input sheet i will get different xlsx file with 19 sheets each.
means as I am able to change the sheets number but how to change the filename.
Thanks in advance
More Answers (1)
Ankit on 19 Dec 2019
using xlswrite in a loop will effect performance. Try this FEX: https://de.mathworks.com/matlabcentral/fileexchange/10465-xlswrite1.
You can try the below changes
fileName = ['rough_', int2str(a), '.xlsx'];