Date: Thu, 6 Feb 2003 20:55:01 +0100
Reply-To: Lex Jansen <l.jansen@LEX-JANSEN.DEMON.NL>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lex Jansen <l.jansen@LEX-JANSEN.DEMON.NL>
Organization: Posted via Supernews, http://www.supernews.com
Subject: Re: Export multiple sas datasets to one excel file
Three programs are now available to export multiple SAS data sets to
multiple sheets in Excel Workbooks. They are available at the following web
MACROEXPORTERNEW.SAS creates a new workbook with multiple sheets from
multiple SAS datasets.
MACROEXPORTERNEWSHEETLOOP.SAS creates a new workbook with multiple sheet
names from multiple sas datasets but gives the excel sheet names in a
series, such as sheet1, sheet2, etc. You can specify the name of the
series. (Such as balance1, balance2 etc).
MACROEXPORTEREXISTING.SAS updates an existing workbook and can add multiple
sheets from multiple SAS databases. If a sheet already exists with the same
name, an option to replace the sheet or increment the sheet is available in
These programs should be run on Windows platforms only with Version 8 of the
SAS System or later.
"Amy Lavis" <alavis@DFMC.ORG> wrote in message
> I'm trying to write a procedure to export multiple sas datasets into one
> excel file with either several worksheets. I tried the wizard and got this
> but can't seem to figure out how to add more than one sas file to the same
> excel table. For example, I would like to export test1 - test10 into one
> test.xls with 10 worksheets.
> PROC EXPORT DATA= WORK.test
> OUTFILE= "C:\My Documents\test.xls"
> DBMS=EXCEL2000 REPLACE ;
> I've done it before but forgot the syntax.