Hi,
I use Stata (putexcel and Mata) to create a heavily formatted Excel spreadsheet that I update automatically by running the same .do file. I'm interested in creating an identical copy of the spreadsheet in a different location, with a different name, automatically every time this .do file is run. I can see some ways of accomplishing the same thing using Excel itself or rewriting my Stata code to loop, but since I already have the spreadsheet I really would like to just create the copy, while preserving the formatting. Putexcel, it seems, can only open and close the file in the same place. I don't see a way to save a copy of the same Excel file opened in memory, or save it somewhere else with a different name. I want to preserve the formatting so not trying to use import/export excel.
Does anybody know a way to do this specific thing? I understand this is probably not a super common way to do this. Thank you for any advice!
I use Stata (putexcel and Mata) to create a heavily formatted Excel spreadsheet that I update automatically by running the same .do file. I'm interested in creating an identical copy of the spreadsheet in a different location, with a different name, automatically every time this .do file is run. I can see some ways of accomplishing the same thing using Excel itself or rewriting my Stata code to loop, but since I already have the spreadsheet I really would like to just create the copy, while preserving the formatting. Putexcel, it seems, can only open and close the file in the same place. I don't see a way to save a copy of the same Excel file opened in memory, or save it somewhere else with a different name. I want to preserve the formatting so not trying to use import/export excel.
Does anybody know a way to do this specific thing? I understand this is probably not a super common way to do this. Thank you for any advice!

Comment