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;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.