I am trying to import a file from excel 2010 using the following code.
proc import out=work.w_pc10
datafile="C:\SPH.MN\PubH-7391\data copy1.aric.b.f3v2.stage1.extractedd.pca.xls"
DBMS=EXCEL Replace;
GETNAMES=YES;
MIXED=NO;
SCANTEST=YES;
USEDATE=TES;
SCANTIME=YES;
RUN;
It gives me this error.
117 proc import out=work.w_pc10
118 datafile="C:\SPH.MN\PubH-7391\data copy1.aric.b.f3v2.stage1.extractedd.pca.xls"
119 DBMS=EXCEL Replace;
ERROR: DBMS type EXCEL not valid for import.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
120 GETNAMES=YES;
121 MIXED=NO;
122 SCANTEST=YES;
123 USEDATE=TES;
124 SCANTIME=YES;
125 RUN;
Can some one help with what I am doing wrong?
Thank you.
S
did you makesure your sas version support MS2010?
I would know how to tell?
How can I find out if MS2010 is supported?
I am a rookie.
Your site may not even license the component that is necessary to import/export pc files.
Run
proc setinit;
run;
and look at the log. Does anything appear that looks like SAS/Access for pcfiles?
Submit this code:
Proc Setinit; run;
and see if the line
SAS/ACCESS Interface to PC Files
Shows in the log. If not, you are not licensed to read Excel files using this method.
Below is part of the log. And YES it shows SAS/ACCESS Interface to PC Files
S
Product expiration dates:
---Base Product 30NOV2012
---SAS/STAT 30NOV2012
---SAS/GRAPH 30NOV2012
---SAS/ETS 30NOV2012
---SAS/FSP 30NOV2012
---SAS/OR 30NOV2012
---SAS/AF 30NOV2012
---SAS/IML 30NOV2012
---SAS/QC 30NOV2012
---SAS/SHARE 30NOV2012
---SAS/LAB 30NOV2012
---SAS/ASSIST 30NOV2012
---SAS/CONNECT 30NOV2012
---SAS/INSIGHT 30NOV2012
---SAS/EIS 30NOV2012
---SAS/GIS 30NOV2012
---SAS/SHARE*NET 30NOV2012
---SAS Enterprise Miner 30NOV2012
---MDDB Server common products 30NOV2012
---SAS Integration Technologies 30NOV2012
---SAS/Secure Windows 30NOV2012
---SAS Bridge for ESRI 30NOV2012
---OR OPT 30NOV2012
---OR PRS 30NOV2012
---OR IVS 30NOV2012
---OR LSO 30NOV2012
---SAS/ACCESS Interface to DB2 30NOV2012
---SAS/ACCESS Interface to ORACLE 30NOV2012
---SAS/ACCESS Interface to SYBASE 30NOV2012
---SAS/ACCESS Interface to PC Files 30NOV2012
---SAS/ACCESS Interface to ODBC 30NOV2012
---SAS/ACCESS Interface to OLE DB 30NOV2012
---SAS/ACCESS Interface to Teradata 30NOV2012
---SAS/ACCESS Interface to MYSQL 30NOV2012
---SAS Stat Studio 30NOV2012
---SAS Workspace Server for Local Access 30NOV2012
---SAS/ACCESS Interface to Netezza 30NOV2012
---SAS/ACCESS Reserved Slot 555 30NOV2012
---SAS/ACCESS Reserved Slot 557 30NOV2012
---SAS/ACCESS Reserved Slot 560 30NOV2012
You may have to ask someone at your place. Two things you might try before asking are:
Try changing DBMS=EXCEL to DBMS=EXCELCS
and, if that doesn't work try DBMS=XLS
One other thought: are you sure that you have the file name entered correctly? I've never seen a file name with that many extensions (i.e., strings separated with periods). That, in itself, could be causing the problem.
Thank you very much. The DBMS=XLS worked.
What a relief.
S
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.