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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 4 replies
  • 2874 views
  • 1 like
  • 3 in conversation