proc import
datafile='D:\Exchange of data\shoes.xlsx'
dbms=xlsx
out=shoes
replace;
ENDCOL="4";
STARTCOL="2";
run;
In the above code it showing error.suggest me where I am going wrong?
Take a look at the following 🙂
I usually follow the thumb rule that says
"Use RANGE= instead of STARTCOL=, STARTROW=, ENDCOL=, ENDROW=, or any combination of these because RANGE= already contains all of these values."
Actually, it's working with range but startcol and endcol.it doesn't work.
Cool. Does that solve your problem then? 🙂
STARTCOL=, STARTROW=, ENDCOL=, ENDROW=, are not available to XLSX engine, try dbms=xls or dbms=excel
The error message you showed is a side effect of the an earlier error. Fix that first.
I would not recommend using PROC IMPORT to read a CSV file with four columns. You will end up typing less code to just write the data step to read it yourself. Plus then you won't need to run a PROC DATASETS step to remove unneccessary labels or formats that PROC IMPORT adds.
data shoes;
infile 'D:\Exchange of data\shoes.csv' dsd truncover ;
length Subsidiary $20 Stores Sales Inventory 8;
input subsidiary -- inventory;
run;
Please don't start a new thread for the same question.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.