Help using Base SAS procedures

import procedure not working

Reply
N/A
Posts: 0

import procedure not working

Attempts to import an excel spreadsheet fail. In the log:

1 PROC IMPORT OUT= WORK.oknow
2 DATAFILE= "Q:\Elizabeth\Testdatabases\torres.xls"
3 DBMS=EXCEL REPLACE;
4 SHEET="torres$";
5 GETNAMES=YES;
6 MIXED=NO;
7 SCANTEXT=YES;
8 USEDATE=YES;
9 SCANTIME=YES;
10 RUN;

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.

The log details don't really explain why this failure occurs. The same result occurs when I use the import wizard. Any help with making my copy of SAS (ver. 9.1.3) import excel spreadsheets would be appreciated.
Super Contributor
Super Contributor
Posts: 365

Re: import procedure not working

Hello Elizabeth,

The problem is with the line SHEET="torres$";
It should be SHEET="torres";

Sincerely,
SPR
N/A
Posts: 0

Re: import procedure not working

Hello, SPR.

Unfortunately, making that change does not change the outcome. I've tried using the import wizard, too, but the failure persists. Deinstalling/reinstalling SAS does not get rid of the problem, either, and neither does the local sysadmin putting me in the unrestricted usergroup that she is in. And yet(!) if I perform the exact same import on *her* machine it does work. I"ve done everything I can think of to get rid of this problem when I try to import on my machine and nothing seems to work.
Super Contributor
Super Contributor
Posts: 3,174

Re: import procedure not working

One presumption here is that you are able to open the "input" file outside of SAS, especially considering the file resides on a "Q" network drive allocation. Also, suggest you share the info about your LIBNAME statement, as revealed in your SAS log output.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: import procedure not working

Can open file in question outside of SAS with no problems. Despite what the error message in the log implies, no LIBNAME statement exists in the script. Error message is identical whether I use the script or the import wizard.

At this point I plan to file a service ticket.
SAS Super FREQ
Posts: 8,676

Re: import procedure not working

Hi:
This may be a relevant Tech Support note:
http://support.sas.com/kb/35/064.html

about accessing files on a network drive (I'm assuming that the Q drive is a network drive).

You might want to work with your SAS Administrator or Tech Support on this issue.You can open a track with Tech Support by filling out and submitting the form at this site:
http://support.sas.com/ctx/supportform/createForm

cynthia
Ask a Question
Discussion stats
  • 5 replies
  • 118 views
  • 0 likes
  • 4 in conversation