Date: Fri, 15 Sep 2006 13:19:05 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: wizard sees sheet of an excel but does not import it
In-Reply-To: <200609141641.k8EEk1ra014429@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
Hi Toby -
The most likely candidate is that there is a leading space in the sheet
name in Excel. his would cause this in you wizard log:
ERROR: Prepare: Invalid bracketing of name ' All hospitals$'.
SQL statement: SELECT * FROM ` All hospitals$`
ERROR: Import unsuccessful. See SAS Log for details.
And then the error you give if you left the leading blank off the import
procedure sheet statement.
Try this fix: select the Excel sheet name tab and use ctrl-v to copy the
name and then paste it into your import procedure sheet statement like
this (including the trailing $):
SHEET="'copied name here$'";
(The $ indicates that you want a sheet and not a named range.)
hth
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
On Wed, 13 Sep 2006 16:49:58 -0700, toby989@HOTPOP.COM wrote:
>Hi All
>
>The wizard (file > import . standard data source: microsoft excel 97,
2000 or
>2002 workbook) in its next screen lets me allow to select 'All
hositals$'
as the
>sheet to import it, but then running it does not work. proc import
doesnt work
>either.
>
>ERROR: File _IMEX_.'All hospitals$'n.DATA does not exist.
>ERROR: Import unsuccessful. See SAS Log for details.
>
>proc import datafile="c:\PSC Pipeline.xls" out=v dbms=excel replace;
>sheet='All hospitals'; getnames=no; dbsaslabel=none;
>run;
>
>Toby
>
>
>sas9.1.3sp4 win2000