Date: Tue, 16 Dec 2008 18:43:23 -0800
Reply-To: Yuewei <yuewei.liu@LIVE.CN>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Yuewei <yuewei.liu@LIVE.CN>
Organization: http://groups.google.com
Subject: Re: how to combine multiple excel files into one sas data set
Content-Type: text/plain; charset=GB2312
On 12月17日, 上午9时21分, zzha...@PARTNERS.ORG (Steven Zhang) wrote:
> Hi all, I have multiple excel files with
> same data structure and same name
> format, like
> spx.xls, spxx.xls etc. It there method
> that I can combine them into one sas data set easily instead of
> importing them individually.
>
> Thanks a lot for your help.
Hi, Zhang, you can try this:
libname mylib "d:\sas\haha.xls";
data _null_;
set sashelp.vstabvw;
if libname='MYLIB' and memtype='DATA' then call execute ('proc
datasets nolist; append base=want data=mylib."'||memname||'"n;quit;');
run;
|