SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

importing from excel file

Reply
New Contributor
Posts: 3

importing from excel file

PROC IMPORT OUT= WORK.EMPLOYEE
DATAFILE= "E:\LDATA\DATA.xlsx"
DBMS=EXCEL REPLACE ;
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;

 

ERROR: DBMS type EXCEL not valid for import.

 

anyone can help

Super User
Posts: 7,371

Re: importing from excel file

To use this, you need SAS/ACCESS to PC Files

If you run SAS 9.4, try DBMS=XLSX.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 3

Re: importing from excel file

thanks for reply. still no luck. here is log below :-
 
 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 PROC IMPORT OUT= WORK.EMPLOYEE
57 DATAFILE= "E:\LDATA\DATA1.xlsx"
58 DBMS=XLSX REPLACE ;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
59 GETNAMES=YES;
60 MIXED=NO;
_____
180
61 SCANTEXT=YES;
________
180
62 USEDATE=YES;
_______
180
63 SCANTIME=YES;
________
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
64 RUN;
 
ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/E:\LDATA\/DATA1.xlsx.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
 
65
66 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
78
Super User
Posts: 18,995

Re: importing from excel file

It looks like your working on a Server. What type of SAS are you using, EG, Studio, On Demand?

 

 

New Contributor
Posts: 3

Re: importing from excel file

Using SAS studio.
Super User
Posts: 18,995

Re: importing from excel file

University Edition? Or with your own server? 

If UE did you set up your shared drive as indicated in the instructions.

 

If so, place the file in the myfolders and reference it as '/folders/myfolders/myfile.xlsx' in your infile.

 

Super User
Posts: 18,995

Re: importing from excel file

University Edition? Or with your own server? 

If UE did you set up your shared drive as indicated in the instructions.

 

If so, place the file in the myfolders and reference it as '/folders/myfolders/myfile.xlsx' in your infile.

 

Ask a Question
Discussion stats
  • 6 replies
  • 457 views
  • 1 like
  • 3 in conversation