Hi, I have a problem where I try to specify the start row to fetch data on my proc import, but I always get this error ERROR 180-322: Statement is not valid or it is used out of proper order for the following program
PROC IMPORT OUT= WORK.name
DATAFILE= routeFile
DBMS=EXCEL REPLACE;
RANGE="'Sheet 1$'";
startrow = 25;
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;I also tried specifying a range after sheet 1$, but it also got me an error Name ''Sheet 1$'A25:J180' is too long for a SAS name in this
context.
open the file with a text editor and see if you are getting what you expect. If not then likely it is an html file.
have you tried DATAROW=25 rather than startrow = 25?
Indeed, I tried both. I think it's a html file with an excel extension. But, Id like a better opinion, because Im kind of newbie in SAS
open the file with a text editor and see if you are getting what you expect. If not then likely it is an html file.
Try other engine.
DBMS=xls
DBMS=xlsx
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.