BookmarkSubscribeRSS Feed
KarthikSrivasthav
Calcite | Level 5


Hi All,

I want to create a excel pivot with SAS by running VBA code .

Regards

Karthik

4 REPLIES 4
snoopy369
Barite | Level 11

I would look into DDE, if you can (google "SAS Excel DDE").  That allows SAS to tell Excel to do things, including run macros.

Vince28_Statcan
Quartz | Level 8

DDE has not been supported since 2003 maybe even earlier than that and is dying with 64 bit platforms/remote submission environments like EG or grid. Nonetheless, for local processes it can still achieve the desired results easier and faster than with some other means.

However, if you are looking for an expandable solution that will work for a long time, I would stay away from DDE.

If you have VBA knowledge, odds are it would be easier to do the opposite. I suggest you give a read to

https://communities.sas.com/thread/9841

I'd love to provide more insights but I've really only played with DDE myself and have not had anything of large enough scale to get into VB-SAS interaction

Vince

*edit Reeza -> Like!

Reeza
Super User

That solution assumes you have SAS Add in for Microsoft Office, which to me, in my experience is more unstable.

I'd go DDE. Currently using it with 64 bit SAS with 32 bit Excel 2010 and not having issues.  But generally, I embed a macro into the Sheet and then call that macro instead of using DDE to actually do things. 

There's also the ODS TableEditor option

Base SAS: Creating a Data Grid Like VB.NET

This is an old question, if the OP googled they'd find the answer easy enough Smiley Happy

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3087 views
  • 1 like
  • 4 in conversation