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 .

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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