BookmarkSubscribeRSS Feed
mali
Calcite | Level 5

Hi,

I have a stored process that can be run in excel using AMO. I am trying to create a macro in excel that will invoke the stored process directly. My questions are as follows.

1) Since I am using SAS EG , I figured I will need to write code to connect to server for running this Stored process. How do I connect to linux server using EXCEL?

2) How do I find the location of metadata? My stored process is located on the server.

Thanks in Advance

2 REPLIES 2
BrunoSilva
Quartz | Level 8

Hello,

I think the paper bellow have exactly what you want, give a check.

Tips and Techniques for Automating the SAS® Add-In for Microsoft Office with Visual Basic for Applications

http://support.sas.com/resources/papers/proceedings11/012-2011.pdf

Sample VBA macro to run a stored process

https://support.sas.com/rnd/datavisualization/BridgeForESRI/V2/stored_process_code.htm

Turn Your SAS® Macros into Microsoft Excel Functions with the SAS® Integrated Object Model and ADO

http://support.sas.com/resources/papers/proceedings14/1598-2014.pdf

Probably you need a few adjustments in order to comply with your SAS version.

Best Regards.

mali
Calcite | Level 5

Hi , I tried to insert the following code in macro editor

Sub TestConnectionToSAS()

Dim sas As SASExcelAddIn

Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object

sas.HelloWorld

End Sub

I am getting a complie error: USer-Defined type not defined. I assume this is because connection to API is not working properly. I am unable to go to references tab within macro editor to enable SAS COM add-in.

Am I missing something.Please let me know .

Thanks

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!

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
  • 2 replies
  • 2355 views
  • 1 like
  • 2 in conversation