01-07-2015 09:18 AM
I want to automate my process can any one help me to execute the VBA codes through SAS.
Currently i am doing in three steps :
1) Executing SAS codes to get the data.
2) Exporting the datasets
3) Executing the VBA codes .
I want to make it into one step.Please help me and i have one more doubt how a SAS in Unix system interacts with Windows(Excel) system.
Thanks & Regards
01-07-2015 09:35 AM
As far as I am aware, Excel does not exist on Unix as it is a Windows system. I imagine you are creating files on Unix which can be read by Excel, e.g. ods tagsets.excelxp, csv, but seeing as you can't start the office engine on Unix I don't see how you would execute VBA which embedded in Office.
Without further information its hard to say, but you could look at it the other way round. Have your data exported from SAS as normal. Then have an Excel file with an OnOpen sub which knows to load the exported datafile. That Excel file could then run other macros as needed.
Oh, and just to add, why would you want to run VBA macros at the end. Output from SAS is more of a review tool, Excel is not good for <insert task here>.
01-08-2015 12:06 PM
If you have Enterprise Guide available, you could package the steps inside EGuide and run the project. You could even run the project unattended. Chris H. has some guidance for embedding VBA in EGuide on the SAS Dummies blog.
You may also be able to embed the call for SAS execution in the SAS add-in for Microsoft Excel. You may need additional product to get that to work.
01-08-2015 12:09 PM
There's not enough information to answer your question.
Yes, it's possible but you need to explain in more detail what you'd like.
Are you using SAS or EG? What version? Are you on a server or desktop or combination?
What do you mean by exporting the data sets? Why is that not part of the SAS program?
What does your VBA do? Can that be embedded in SAS?