Help using Base SAS procedures

Cannot import from excel2010

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Cannot import from excel2010

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


Accepted Solutions
Solution
‎03-01-2012 04:21 PM
Occasional Contributor
Posts: 8

Cannot import from excel2010

Thank you very much. The DBMS=XLS worked.

What a relief.

S

View solution in original post


All Replies
Frequent Contributor
Posts: 110

Cannot import from excel2010

did you makesure your sas version support MS2010?

Occasional Contributor
Posts: 8

Cannot import from excel2010

I would know how to tell?

How can I find out if MS2010 is supported?

I am a rookie.

PROC Star
Posts: 7,363

Cannot import from excel2010

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?

Super User
Posts: 10,516

Cannot import from excel2010

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.

Occasional Contributor
Posts: 8

Cannot import from excel2010

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

PROC Star
Posts: 7,363

Re: Cannot import from excel2010

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.

Solution
‎03-01-2012 04:21 PM
Occasional Contributor
Posts: 8

Cannot import from excel2010

Thank you very much. The DBMS=XLS worked.

What a relief.

S

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 1705 views
  • 1 like
  • 4 in conversation