BookmarkSubscribeRSS Feed
saskupo
Calcite | Level 5

I just discovered that there is a SAS Add-in in Microsoft Excel. I just want to know if there is  a way to know the current directory of the excel file using the code that will be run in SAS Add-in inside excel. The excel is connected through SAS EG, server based. I have tried to use  the following code but the result points to the location:

D:\SASConfig94\Lev1\SASApp94\

 

libname here '' access=readonly;

data _null_;
path = pathname('here');
call symput('xpath', trim(left(path)));
%put &xpath;
run;

 

1 REPLY 1
tomrvincent
Rhodochrosite | Level 12
=LEFT(CELL("filename", A1), FIND("[", CELL("filename", A1))-1)

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
  • 514 views
  • 0 likes
  • 2 in conversation