/** Import an XLSX file. **/
libname g '/folders/myfolders/';
PROC IMPORT DATAFILE="/folders/myfolders/grocery_coupons.xls";
OUT=g.permanent
DBMS=XLSX
REPLACE;
RUN;
/** Print the results. **/
PROC PRINT DATA=g.permanent; RUN;
log
The error is the same as in your last question.
https://communities.sas.com/t5/SAS-Analytics-U/Error-using-Proc-import/m-p/290978
There is no semicolon after the file path.
I always place the semi-colon on a multiple line statement on a new line and align it with the beginning of the statement. The lines in between are indented. The same way that I format DO/END blocks of code.
I find that is makes it much less likely that I will accidently insert an extra semi-colon into the middle of long statements.
libname g '/folders/myfolders/';
PROC IMPORT
DATAFILE='/folders/myfolders/grocery_coupons.xlsx'
OUT=g.permanent
DBMS=XLSX
REPLACE
;
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.