BookmarkSubscribeRSS Feed
lambdavu
Fluorite | Level 6

Is it possible to use the task "Copy data to server" to achieve this?

When I try it on my machine, with SAS E.G. open, I cannot see the libraries i just assigned in SAS enterprise guide in the list of libraries available to the Excel Task. It's like Excel is launching a separate SAS session.

Since I don't have admin priviledges on the PC, I don't think I can set up a local sas metadata server. Is there a workaround?

 

Thanks!

1 REPLY 1
fifthand57th
SAS Employee

@lambdavu

 

Just want to be certain that I understand what you want to do first... SAS Add-in for MS Office connects to local SAS and you want to create a SAS data set from data in an Excel worksheet. Is this accurate?

 

Every client (EG or SAS Add-in, etc.) instantiates a new SAS workspace server session on whatever "server" the client connects to (local or remote). So EG connecting to local SAS starts a sas.exe process for it alone. The SAS Add-in also starts a sas.exe process for it alone. If you assign libraries using "Assign Project Library" task or in SAS code in EG, those libraries will not be visible/available in other clients.

 

If you have the SAS Add-in for MS Office version 7.13 or later, you can run SAS code directly from the SAS ribbon in Excel. Thus, you can assign your libraries by running LIBNAME statements directly from Excel. Side Note: If you do not have the latest version of the SAS Add-in (7.15), we highly recommend upgrading to one of the two latest versions as they have "A" level support. See SAS Note 59821.

 

And yes, you can use the "Copy to SAS Server" task to create a SAS data set from Excel worksheet data. You will need to issue your LIBNAME statements prior to using this task using "Programs" on the SAS ribbon in Excel if you have version 7.13 or later.

 

If you do not have SAS Add-in version 7.13 or later, you can create an autoexec.sas file that contains your LIBNAME statements and save it in the \SASFoundation\9.4\ installation directory on your machine. The default is C:\Program Files\SASHome\SASFoundation\9.4\. When the SAS Add-in (or other clients, like EG, that connect to the same local server) instantiates it's local workspace server, the autoexec.sas file will execute and the libraries defined in it will be available in the SAS Add-in when connected to Local server. (So make sure you restart Excel and/or EG, when you create an autoexec.sas.)

 

Hope this helps.

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!

Discussion stats
  • 1 reply
  • 764 views
  • 1 like
  • 2 in conversation