BookmarkSubscribeRSS Feed
Meng_Xu
Fluorite | Level 6

When I use PROC IMPORT to import Excel files, I got the errors as shown below:

 

Code:

proc import

out = Variable

datafile = "&inputPath./&varfile."

DBMS=XLSX REPLACE;

GETNAMES=yes;

/* DATAROW = 2; */

GUESSINGROWS=500;

MIXED=YES;

run;

 

 

SAS LOG:

23 proc import

24 out = Variable

25 datafile = "&inputPath./&varfile."

26 DBMS=XLSX REPLACE;

NOTE: The previous statement has been deleted.

NOTE: The previous statement has been deleted.

27 GETNAMES=yes;

28 /* DATAROW = 2; */

29 GUESSINGROWS=500;

____________

180

30 MIXED=YES;

_____

180

ERROR 180-322: Statement is not valid or it is used out of proper order.

31 run;

 

This code works fine in PC SAS, but the error keeps coming out when I run this code in SAS EG. If I comment out thoes two options "GUESSINGROWS=" and "MIXED=", then there is no errors.

 

Does anyone has any idea what causes this error and how to solve this problem?

 

Thank you

 

 

2 REPLIES 2
ballardw
Super User

Guessingrows only applies to text type file formats such as CSV.

 

Depending on version of SAS EG the MIXED option doesn't work with later versions of Excel 2007 or later.

LinusH
Tourmaline | Level 20

Are you executing the exact same code in PC SAS and EG?

Version of PC SAS?

Do you access the same PC SAS from EG, or do you use a WorkSpace Server (host and SAS version?)

Data never sleeps

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1528 views
  • 0 likes
  • 3 in conversation