Date: Thu, 20 Oct 2011 12:42:01 -0700
Reply-To: Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Subject: Re: ods tagsets ExcelXP on Unix How to get into Excel?
Content-Type: text/plain; charset=ISO-8859-1
Hi Shell Bell,
I don't have an answer to your question, but I couldn't resist showing you
this cool alternative to your code:
ods tagsets.ExcelXP options(sheet_interval='bygroup'
title1 "Summary of Data";
title2 "#BYVAL(cohort) Cohort";
proc report data=dsn headline missing split='*' nowd
<code truncated here>
When you use a BY statement within PROC REPORT, you can use #BYVAL in
titles, and, if you are using ExcelXP, you can label the tabs based on the
values of your BY variable. If you want prefixes on them, you could say
SHEET_LABEL='Subject ' and that would put that as a prefix followed by the
value of the BY variable, and that would be the tab name.
On Thu, Oct 20, 2011 at 11:23 AM, Shell Bell <firstname.lastname@example.org> wrote:
> I have the SAS add-in for excel. Working on Unix EG I wrote the following
to get one tab per name.
> I cannot open the excel directly, as it has to be written to Unix, but EG
has a results window that asks "Download Results?" Click download and
miraculously it comes opens into excel.
> Can I automate this or have some other method of getting it from the unix
to the NT side where excel lives?
> %macro seeit;
> proc sql noprint;
> select Name into: Name1-:Name20
> from sashelp.class;
> ods tagsets.ExcelXP style=sasdocprinter file="~/agencydata/SeeClass1.xls";
> %do i= 1 %to 20;
> ods tagsets.ExcelXP
> options(sheet_name="See Class" width_fudge='1.0' ORIENTATION='LANDSCAPE'
> proc print data=class noobs;
> where name="&&name&i";
> ods tagsets.ExcelXP close;
> %mend seeit;
> Thanks in advance,
> Shell Bell