Excel SaveAs method and naming conventions
12 ビュー (過去 30 日間)
古いコメントを表示
I was curious if there was a built in WB.SaveAs method and how to use it.
I'm currently using WB.Save to highlight the difference between two excel files, but wanted to have not override the original document.
Also would like the files' names to end differently as well by using the folder's names at end, as excel doesn't want to open up two files with the same names.
0 件のコメント
採用された回答
Image Analyst
2022 年 6 月 21 日
編集済み: Image Analyst
2022 年 6 月 21 日
6 件のコメント
Image Analyst
2022 年 6 月 29 日
Try it this way:
baseFileName = sprintf('%s_%2.2d.xlsx', fname, file_index);
fullFileName = fullfile(pwd, baseFileName);
fprintf('Saving "%s".\n', fullFileName);
WB.SaveAs(fullFileName);
その他の回答 (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!