Hi all,
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
Karthik Srivasthav...
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>.
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.
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.
For starters:
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?
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.