I get that, I'm trying to understand your problem so that we can offer a solution. Sometimes SAS isn't the solution, especially when someone mentions Excel macros. Rather you'd be better served:
1. Using OS/VBS commands
2. Migrating your full process to SAS.
@kiran28 wrote: I dont know much about SAS as i said i am new to this. I was just looking for help.
This is a really old presentation but it somewhat aligns how SAS can be used in this sort of thing, but DDE isn't sustainable in the long run for building processes. And if you have a server it's not a solution I would consider production ready and stable.
http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/FareezaKhurshed-CoordinateComplexReports-Spring2014.pdf
DDE is not enabled in Excel 2016, you'll need to enable it first if you decide to go down that route.
... View more