How do I incrementally increase an excel file everytime I run the code to avoid overwriting
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mohamed Sardheye
el 3 de Oct. de 2022
Comentada: Mohamed Sardheye
el 10 de Oct. de 2022
I create my excel sheet using writetable(T,'Test no21.xlsx') I would like to incrementally increase the number of the excel file to avoid overwriting the previous documents, how can I achieve that?
0 comentarios
Respuesta aceptada
Geoff Hayes
el 3 de Oct. de 2022
k = 22;
filename = sprintf('Test no%d.xlsx', k);
writetable(T, filename);
Or do you need to determine the 21 from the original file first?
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!