I'm unable to import excel file with extension xlsx. I'm using the below code.
proc import datafile='.xlsx' dms=xlsx replace;
run;
Could you please help out how to resolve this...
proc import datafile='MyExcelWorkbook.xlsx' dbms=xlsx replace; run;
Try :
proc import datafile="<your-path>.xlsx" dbms=xlsx replace; run;
If you are using SAS 9.4 M2 or above you can also use Libname XLSX :
https://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/
In addition to @r_behata's and @SASKiwi's answers, it could be useful to also add:
proc import datafile="<your-path>.xlsx" dbms=xlsx out=<lib.dataset> replace; sheet=<sheet_name>; getnames=Yes; run;
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!
Register now
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.