BookmarkSubscribeRSS Feed
CathyVI
Pyrite | Level 9

I am problem importing excel using libname statement on SAS 9.4?

I am using the example on SAS Programming lesson. They used examples for SAS Studio and Enterprise guide but its not working for Windows 10. Any help will be appreciated;

 

libname np xlsx "FILEPATH/np_info.xlsx"; 
4 REPLIES 4
ballardw
Super User

Could you please describe "not working" more completely?

 

If you get errors copy from the log both the code and the error messages and paste into a code box opened using the forum's {I} icon to preserve formatting of error messages.

 

If you are using the University edition then SAS runs in a virtual box that does not see your entire hard drive only those parts established using the virtual machine. So the files have to be in specific folders AND the syntax is Linux based with the path starting "/folders/myfolders".

 

If you are using server based version then the path has to match what the server sees and likely it cannot access your hard drive.

CathyVI
Pyrite | Level 9

@ballardw

 

This is the error message i received.


{58 options validvarname=v7;
59 libname NP xlxs 'C:\Users\Adewumi.Adegboye\Documents\EPG194\data\np_info.xlsx';
ERROR: The XLXS engine cannot be found.
ERROR: Error in the LIBNAME statement.}

 

And this is my code;

 

{options validvarname=v7;
libname work excel "C:\Users\Adewumi\Documents\EPG194\data\np_info.xlsx" access=read;
run;}

r_behata
Barite | Level 11

Make sure that you are having SAS V 9.4 Maintenance 2 or higher to access the xlsx through Libname.

 

Also, the XLSX engine does require a license for SAS/ACCESS to PC Files. The SAS University edition has it at a part of the Package.

 

https://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/

 

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 915 views
  • 0 likes
  • 3 in conversation