Date: Mon, 16 Mar 2009 16:48:30 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: how to combine multiple excel files with multiple rows of
header.
In-Reply-To: <49BE85C6.1391.00DD.1@hsph.harvard.edu>
Content-Type: text/plain; charset=ISO-8859-1
Probably easiest to bring them in with no names at all (depending on your
DBMS option you'll have F1 F2 F3 or A B C as names) and then do a custom
rename after they're brought in (make a name from row 3 and row 4, using
RETAIN or LAG to combine the name together).
-Joe
On Mon, Mar 16, 2009 at 4:01 PM, Zibiao Zhang <zzhang@hsph.harvard.edu>wrote:
> Dear all,
> I have multiple excel files, each file has two spreadsheets. Four variables
> are common throughout all the sheets, but may have different name. Each
> sheet has summary on row 1 and 2, variable names are in row 3 and 4.
> Anybody knows a way to combine all the sheets of files into one sas datasets
> with only the four common variables?
>
> Thanks,
> STeven
>
|