BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sk4r
Obsidian | Level 7

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.

1 ACCEPTED SOLUTION

Accepted Solutions
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

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.

View solution in original post

4 REPLIES 4
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

have you tried DATAROW=25 rather than startrow = 25?

Sk4r
Obsidian | Level 7

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

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

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.

Ksharp
Super User

Try other engine.

 

DBMS=xls
DBMS=xlsx