Date: Fri, 11 Nov 2005 20:09:37 -0500
Reply-To: Chuck Enright <chuck.sas@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Chuck Enright <chuck.sas@GMAIL.COM>
Subject: Re: Importing to SAS from MS Excel
In-Reply-To: <1131529844.270645.305160@g47g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
In Excel, those rows and or columns at one time contained data and or
formatting. Regardless if the user has cleared both data and formats, Excel
still considers those cells as "used". Therefore are imported into Sas. In
Sas 9, you can use a whare data option like ...
PROC IMPORT OUT= SASUSER.IAP (where=(Varname NE " "))
DATAFILE= "E:\MY EXCEL DOCS\IAP2005.xls"
DBMS=EXCEL REPLACE;
SHEET="'2003$'";
GETNAMES=YES;
MIXED=YES;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
On 11/9/05, Sahuquillo <bangali.doctor@gmail.com> wrote:
>
> Hi,
>
> I have an excel table with 180 rows filled in, When suing Proc IMPORT
> as folows:
> PROC IMPORT OUT= SASUSER.IAP
> DATAFILE= "E:\MY EXCEL DOCS\IAP2005.xls"
> DBMS=EXCEL REPLACE;
> SHEET="'2003$'";
> GETNAMES=YES;
> MIXED=YES;
> SCANTEXT=YES;
> USEDATE=YES;
> SCANTIME=YES;
> RUN;
>
> I get all the empty rows in the SAS data set. How can only import rows
> that have variables filled in and avoid to import empty rows ?
>
> Thank you
>
|