Help using Base SAS procedures

PROC IMPORT to get a specific range

Reply
Super Contributor
Posts: 268

PROC IMPORT to get a specific range

Here's my step:

proc import datafile="G:\Departments\Research\test scores\SCREADY\&prevyr.-&yr.\&yr.SCREADY.xlsx" out=state dbms=xlsx replace;
sheet="&yr SC READY STATE";
range="A1:BS97";
run;

I'm also getting columns BT through DL, which I don't want.

 

Trusted Advisor
Posts: 1,410

Re: PROC IMPORT to get a specific range

[ Edited ]

I'm not sure but you may try:

 

libname mydata xlsx "G:\Departments\Research\test scores\SCREADY\&prevyr.-&yr.\&yr.SCREADY.xlsx";

 

proc import datafile=mydata;
sheet="&yr SC READY STATE";
range="A1:BS97";
run;

Occasional Contributor
Posts: 14

Re: PROC IMPORT to get a specific range

[ Edited ]

Try this -

 

proc import datafile="C:\TESTFILE.xlsx" out=testme dbms=excel replace;

getnames=yes;

range='A1:BS27'; /*I set to 27, as I just had to make a sample sheet to test what's not working for you*/

run;

 

 

Ask a Question
Discussion stats
  • 2 replies
  • 343 views
  • 0 likes
  • 3 in conversation