BookmarkSubscribeRSS Feed
Ranjeeta
Pyrite | Level 9

Hello,

 

I would appreciate if you can advide why I get the following error message when I replace EXCEL with XLSX in the code :

 


1 PROC IMPORT OUT=CW_LHIN_Q4FY1819
2 DATAFILE= "Y:\KNOWLEDGE
2 ! MANAGEMENT\STAFF\Ranjeeta\AdHoc\COVID\Stroke\Stroke Dashboard\IDS Regional Stroke
2 ! Dashboard Row Level Extract FY1819 Q4 CWLHIN.xlsx"
3 DBMS=XLSX REPLACE;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
4 RANGE="DAD$";
5 SCANTEXT=YES;
--------
180
6 USEDATE=YES;
-------
180
7 SCANTIME=YES;
--------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.

8 RUN;

 

PROC IMPORT OUT=CW_LHIN_Q4FY1819
            DATAFILE= "Y:\KNOWLEDGE MANAGEMENT\STAFF\Ranjeeta\AdHoc\COVID\Stroke\Stroke Dashboard\IDS Regional Stroke Dashboard Row Level Extract FY1819 Q4 CWLHIN.xlsx" 
            DBMS=EXCEL REPLACE;
     RANGE="DAD$"; 
     SCANTEXT=YES;
     USEDATE=YES;
     SCANTIME=YES;
RUN;/*251*/
2 REPLIES 2
andreas_lds
Jade | Level 19

Afaik because the opitons scantext, usedate and scantime are not defined when using dbms=xlsx

SASKiwi
PROC Star

Compare the options available for EXCEL and XLSX in this documentation link .

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 830 views
  • 1 like
  • 3 in conversation