Lesson 2: Accessing Data: Creating an excel libref.
I succesfully created the code using SAS Enterprose, ran the program, no errors, NP was successfully assigned. Problem is that the NP libname does not appear in my list of libraries. Where is it? I know it exists because I am able to complete the rest of the activity and SAS recognizes the library as I am writing the proc contents data=np.parks
This LIBNAME statement will always work:
libname test xlsx "some place that positively does not exist at all";
because you can use LIBNAME XLSX (and other similar engines) to create a new file. The ERROR will happen when you try to create a dataset in the library, or when you try to read something from there.
Your most probable mistake is using the local path to the Excel file in your code, while your SAS process runs in fact on a remote server.
Please post your code, and the log from this:
%put %sysfunc(pathname(work));
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.
Find more tutorials on the SAS Users YouTube channel.