From: Gerhard Hellriegel on
Stop! I was wrong!
The DATA step with import is NOT created by importing a XLS file. In that
case, SAS/ACCESS is used!

first question: you have SAS/ACCESS to PC files licensed? If not, the direct
import of .XLS files is not possible. What you can do: Store the file as CSV
in EXCEL and import that. That do not use SAS/ACCESS.
second (if you have ACCESS to PC-FILES): did you ever import something
successful?

If you want to go direct to EXCEL without ACCESS, you might have a look on
DDE. With that you can also get data from EXCEL 2 SAS.

Gerhard



On Wed, 22 Aug 2007 17:14:49 +0300, Richie N.M. <sas.kenya(a)GMAIL.COM> wrote:

>The error I get is a result of running the proc import. I don't have a data
>step in the code. I get the same error message whether I read the data from
>the file server or from the local drive. I have tried using the menu (File
>-> Import Data) and I still get the same error message.
>
>The code is as below:
>**
>*proc import* datafile = "C:\Data\CBC_2005.xls"
>out = work.cbc_05;
>sheet = "CBCData";
>getnames = yes;
>*run;*
>**
>And the error code is as below:
>
>ERROR: Connect:
>
>ERROR: Error in the LIBNAME statement.
>
>Connection Failed. See log for details.
>
>NOTE: The SAS System stopped processing this step because of errors.
>
>NOTE: PROCEDURE IMPORT used (Total process time):
>
>real time 7.04 seconds
>
>cpu time 0.26 seconds
>**
>*
>*
From: Ai Hua Wang on
Try the following:

PROC IMPORT OUT= work.cbc_05
DATAFILE= "C:\Data\CBC_2005.xls"
DBMS=EXCEL5 REPLACE;
GETNAMES=YES;
RUN;



____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
From: "Howard Schreier <hs AT dc-sug DOT org>" on
On Wed, 22 Aug 2007 17:14:49 +0300, Richie N.M. <sas.kenya(a)GMAIL.COM> wrote:

>The error I get is a result of running the proc import. I don't have a data
>step in the code. I get the same error message whether I read the data from
>the file server or from the local drive. I have tried using the menu (File
>-> Import Data) and I still get the same error message.
>
>The code is as below:
>**
>*proc import* datafile = "C:\Data\CBC_2005.xls"
>out = work.cbc_05;
>sheet = "CBCData";
>getnames = yes;
>*run;*
>**
>And the error code is as below:
>
>ERROR: Connect:
>
>ERROR: Error in the LIBNAME statement.
>
>Connection Failed. See log for details.
>
>NOTE: The SAS System stopped processing this step because of errors.
>
>NOTE: PROCEDURE IMPORT used (Total process time):
>
>real time 7.04 seconds
>
>cpu time 0.26 seconds
>**
>*
>*

I ran the code as shown (except for the bogus asterisks of course) after
duplicating Richie's folder and file and sheet names. It ran with no problem
(SAS 9.1.3 SP4 on Win XP Pro).

http://support.sas.com/techsup/unotes/SN/003/003845.html echoes the log
messages, but it clearly pertains to MS Access, not Excel.

I would present this problem to SAS Tech Support.