From: Deborah Testa on
Hello,



I'm trying to read data from an .xls file:



Proc import out = work.look

Datafile = "c:\temp\Data.xls" dbms = EXCEL replace;

Sheet = "Final Parameters$"n;

Getnames = YES;

MIXED = YES;

Run;



I get an error that says: ERROR: File _IMEX_.'Final Parameters$'n.DATA
does not exist. Is there something illegal about the name? A worksheet
named Final Parameters definitely exists. I get the same message
whether I use the import wizard or write SAS code.



Thanks,



Deborah














From: Joe Matise on
I don't think you need the $, n bit in sheet=. That's for libname in my
experience. Try it with just
Sheet="Final Parameters";

If that doesn't work, what shows up if you use libname?
libname whatever excel "file.xls";

Should show up in the explorer window as a library. Do you get what you
expect? Maybe there's a space after the name or something?

If it does and still won't work, it could have something wrong with it -
I've had a (very few) spreadsheets where something funny prevented it from
being opened, particularly being near 255 columns, or something similar.

-Joe

On Thu, Feb 4, 2010 at 3:34 PM, Deborah Testa <dtesta(a)sevenofninesystems.com
> wrote:

> Hello,
>
>
>
> I'm trying to read data from an .xls file:
>
>
>
> Proc import out = work.look
>
> Datafile = "c:\temp\Data.xls" dbms = EXCEL replace;
>
> Sheet = "Final Parameters$"n;
>
> Getnames = YES;
>
> MIXED = YES;
>
> Run;
>
>
>
> I get an error that says: ERROR: File _IMEX_.'Final Parameters$'n.DATA
> does not exist. Is there something illegal about the name? A worksheet
> named Final Parameters definitely exists. I get the same message
> whether I use the import wizard or write SAS code.
>
>
>
> Thanks,
>
>
>
> Deborah
>
From: Carol Bristow on
I've found it necessary to have the $ for some sheet names (those with
spaces as I recall), but never use the n after the quote. That's used
on SAS names, and the sheet name isn't a SAS name.

Carol Bristow
DPRA Inc.
1655 N. Ft Myer Dr. Ste925
Arlington, VA 22209
phone: 703-682-2612
fax: 703-528-3100


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of Joe
Matise
Sent: Thursday, February 04, 2010 5:51 PM
To: SAS-L(a)LISTSERV.UGA.EDU
Subject: Re: Reading Data From a Specific Excel Worksheet

I don't think you need the $, n bit in sheet=. That's for libname in my
experience. Try it with just
Sheet="Final Parameters";

If that doesn't work, what shows up if you use libname?
libname whatever excel "file.xls";

Should show up in the explorer window as a library. Do you get what you
expect? Maybe there's a space after the name or something?

If it does and still won't work, it could have something wrong with it -
I've had a (very few) spreadsheets where something funny prevented it
from
being opened, particularly being near 255 columns, or something similar.

-Joe

On Thu, Feb 4, 2010 at 3:34 PM, Deborah Testa
<dtesta(a)sevenofninesystems.com
> wrote:

> Hello,
>
>
>
> I'm trying to read data from an .xls file:
>
>
>
> Proc import out = work.look
>
> Datafile = "c:\temp\Data.xls" dbms = EXCEL replace;
>
> Sheet = "Final Parameters$"n;
>
> Getnames = YES;
>
> MIXED = YES;
>
> Run;
>
>
>
> I get an error that says: ERROR: File _IMEX_.'Final
Parameters$'n.DATA
> does not exist. Is there something illegal about the name? A
worksheet
> named Final Parameters definitely exists. I get the same message
> whether I use the import wizard or write SAS code.
>
>
>
> Thanks,
>
>
>
> Deborah
>