BookmarkSubscribeRSS Feed
amit_kumar_11_BTCI
Calcite | Level 5

In base sas we can invoke vba macro using DDE and X commands. But how can we do same in EG?

4 REPLIES 4
MichelleHomes
Meteorite | Level 14

DDE doesn't work in SAS workspace servers or stored process servers (often accessed with SAS Enterprise Guide). Chris Hemedinger wrote a great blog post about the ways to export from SAS to Excel files which may help provide some alternative methods... You may also find the comments helpful... How do I export from SAS to Excel files: Let me count the ways - The SAS Dummy

The ability to use a X command depends on the configuration your SAS Administrator has set. You may find this blog post by Paul Homes useful NOXCMD: NO eXternal CoMmanDs! - platformadmin.com

KInd Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
amit_kumar_11_BTCI
Calcite | Level 5

Hi Michelle,

Thanks for the reply but my requirement is not to read excel data but invoke VBA macro using EG.

In base sas we can use filename with DDE engine and then use put RUN statement to run vba macro.

But this can not be done in EG as DDE is not supported.

MichelleHomes
Meteorite | Level 14

I understand... and that's right DDE is not a technology that is supported in EG. So depending on what your VBA code does, another technique such as the excel libname engine may be the approach to take.

Kind Regards,

MIchelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
ChrisHemedinger
Community Manager

Depending on what it is you're trying to do, you might be able to use a PowerShell script.  I've got several examples of SAS + PowerShell here:

PowerShell - The SAS Dummy

For this to work you would still need XCMD privileges.  My examples don't include Excel automation, but those are easy to find with a web search.

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2278 views
  • 1 like
  • 3 in conversation