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;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: