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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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