LIBNAME NP XLSX "S:/EPG1V2/data/np_info.xlsx";
run;
options validvarname=v7;
proc contents data=np.parks;
run;
libname np clear;
If it says DATA does not exist, then the data set you are looking for does not exist. Perhaps you have spelled the name wrong, or you have the wrong LIBNAME statement.
From now on, when you have an error in the log, please show us the ENTIRE log for that PROC or for that DATA step. We need to see the ENTIRE log, not selected parts, not the parts you want to show us, all of it, every single line, for that PROC or DATA step.
If it says DATA does not exist, then the data set you are looking for does not exist. Perhaps you have spelled the name wrong, or you have the wrong LIBNAME statement.
From now on, when you have an error in the log, please show us the ENTIRE log for that PROC or for that DATA step. We need to see the ENTIRE log, not selected parts, not the parts you want to show us, all of it, every single line, for that PROC or DATA step.
Just because the LIBNAME statement works it does not mean that the XLSX file exists. SAS does not know when you run the LIBNAME statement if your intent was to read from an existing workbook or make a new one.
And even if the XLSX file does exists that does not mean that there is necessarily a sheet in it named PARKS.
Hi. Do you have the correct path? For example, you are referencing the S drive.
I tried running your program and it worked okay referencing the file on my local drive. If your path is correct, can you share the full SAS log?
Thanks.
Your Libname statement looks fine per the SAS log notes. I suggest opening the workbook and verifying the name Parks hasn't been inadvertently over written.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.