Hi Community,
I am having issues debugging my Proc Import code. I tried multiple ways but still issue persisted.
proc import datafile="C:\FilePath\Test_report.xlsx" DBMS=Excel REPLACE out=test;
SHEET="Rep01_mat";
getnames=YES;
namerow = 4;
datarow=5;
run;
Here is the error I get
706 getnames=YES; 2707 namerow = 4; ------- 180 2708 datarow=5; ------- 180 ERROR 180-322: Statement is not valid or it is used out of proper order. 2709 run;
The variable names are in Row 4 and data in row 5.
Any thoughts and suggestions are appreciated.
Thank you for your time.
I have found the answer through some testing.
proc import datafile="C:\filepath\report.xlsx" DBMS=Excel REPLACE out=test;
SHEET="REP01_mat";
Range = "REP01_mat$A4:K0";
getnames=Yes;
run;
I have found the answer through some testing.
proc import datafile="C:\filepath\report.xlsx" DBMS=Excel REPLACE out=test;
SHEET="REP01_mat";
Range = "REP01_mat$A4:K0";
getnames=Yes;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.