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
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.)
DDS Data Extraction
On Wed, 13 Sep 2006 16:49:58 -0700, toby989@HOTPOP.COM wrote:
>The wizard (file > import . standard data source: microsoft excel 97,
>2002 workbook) in its next screen lets me allow to select 'All
>sheet to import it, but then running it does not work. proc import
>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;