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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 880 views
  • 1 like
  • 3 in conversation