Reputation: 2886
I have a batch job that creates some CSV files, which I import into EXCEL using macros. I then use the batch job to open the EXCEL file, using the "start" command. However, I do not want to incorporate the closing from within EXCEL, as I want this batch job to open and close the EXCEL file, not a macro. The point will be that I will populate the EXCEL file, but another person needs to open this file and examine the results, so I cannot have a macro that closes it automatically. Any help would be great!
Upvotes: 0
Views: 21023
Reputation: 21
You can use taskkill /f /im excel.exe > nul to close the open Excel file.
Upvotes: 2
Reputation: 2886
Turns out that there is not way to actually save automated macro changes and then close excel, without using VBA. However, in my case, the data is still available, so terminating the excel.exe is enough, since the excel will run the macros when it is opened and the user/s can save the work then.
Upvotes: 0