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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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