From: Raj on
Hi,

Im using SAS on Z/OS. I have advanced excel where i usually copy and
paste the values from SAS table to excel.(because formulas get
disturbed)
Can anyone suggest me how to automate this.

Regards,
Tumu
From: Sudo Ku on
Hi Tumu:

I can think of three ways you could do this with Base SAS.

1) Output your data using ods and setup a VBA macro in excel to take of the=
formulas that you would like. If need be you can automate the VBA macro ca=
ll using DDE or if you only have a small number of files run the macro manu=
ally within the excel envionment

2) You can output directly into an excel sheet template using a DDE triplet=
and data _null_ print feature with tabs (09X) and have your formulas setup=
in adjacent cells and then save the file as a new name.

3) The excelxp tagset allows for some functions to be passed from SAS into =
excel

In cases of one and two the downside is you have to use DDE which takes som=
e time to learn. I usually find that solution 1 tends to be a bit easier on=
the sas coding but solution 2 can work well in insances where the number o=
f rows and columns is stable. Finally if your functions are relatively simp=
le R1C1-R1C2*R1C3 you might want to take a look at what the Excel xp tagset=
can do for you. On your comment about excel formulas=2C I tend to trust th=
e calculations done in SAS far more than I would something from excel=2C bu=
t maybe thats just me.

Regards=2C

Kevin







> Date: Tue=2C 5 Jan 2010 10:52:11 -0800
> From: rajiv468(a)GMAIL.COM
> Subject: SAS using advanced excel
> To: SAS-L(a)LISTSERV.UGA.EDU
>=20
> Hi=2C
>=20
> Im using SAS on Z/OS. I have advanced excel where i usually copy and
> paste the values from SAS table to excel.(because formulas get
> disturbed)
> Can anyone suggest me how to automate this.
>=20
> Regards=2C
> Tumu
=20
_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://go.microsoft.com/?linkid=3D9691815=
From: Arthur Tabachneck on
Tumu,

Since you can copy and paste, I would presume that the 'clipbrd' method
should work.

i.e., if you assign a filename to the clipbrd method e.g.:

filename _cb clipbrd;

couldn't you then just build a simple data step that writes to that
filename (which turns out to simply be the clipboard), from which you can
paste directly into excel? e.g.,
data _null_;
file _cb;
/* put whatever data step statements you need here simply using
put statements to write the desired values to the clipboard */
run;

and, of course, then clear the filename: i.e.,
filename _cb clear;

HTH,
Art
-------
On Tue, 5 Jan 2010 10:52:11 -0800, Raj <rajiv468(a)GMAIL.COM> wrote:

>Hi,
>
>Im using SAS on Z/OS. I have advanced excel where i usually copy and
>paste the values from SAS table to excel.(because formulas get
>disturbed)
>Can anyone suggest me how to automate this.
>
>Regards,
>Tumu
From: Savian on
On Jan 5, 11:52 am, Raj <rajiv...(a)gmail.com> wrote:
> Hi,
>
> Im using SAS on Z/OS. I have advanced excel where i usually copy and
> paste the values from SAS table to excel.(because formulas get
> disturbed)
> Can anyone suggest me how to automate this.
>
> Regards,
> Tumu

If you have a Windows machine somewhere, you can generate the Excel
file using the SaviCellsPro application. it takes XML as the layout
and can generate binary Excel files in either 2003 or 2007 format. it
also generates PDF and HTML.

It is available on http://www.sasCommunity.org

Look at SaviCellsPro, not SaviCells. It is free and there are
instructions on the site and samples embedded in the application.

Alan
http://www.savian.net
From: Sudo Ku on
Hi Art:

=20

Thanks for that I hadn't considered using the filename clipbrd as a method =
of filling the clipboard buffer. The next time I'm moving information betwe=
en SAS and Excel or SAS and Word I'll give it a go..

=20

Regards=2C

=20

Kevin =20
=20
> Date: Tue=2C 5 Jan 2010 15:39:42 -0500
> From: art297(a)NETSCAPE.NET
> Subject: Re: SAS using advanced excel
> To: SAS-L(a)LISTSERV.UGA.EDU
>=20
> Tumu=2C
>=20
> Since you can copy and paste=2C I would presume that the 'clipbrd' method
> should work.
>=20
> i.e.=2C if you assign a filename to the clipbrd method e.g.:
>=20
> filename _cb clipbrd=3B
>=20
> couldn't you then just build a simple data step that writes to that
> filename (which turns out to simply be the clipboard)=2C from which you c=
an
> paste directly into excel? e.g.=2C
> data _null_=3B
> file _cb=3B
> /* put whatever data step statements you need here simply using
> put statements to write the desired values to the clipboard */
> run=3B
>=20
> and=2C of course=2C then clear the filename: i.e.=2C
> filename _cb clear=3B
>=20
> HTH=2C
> Art
> -------
> On Tue=2C 5 Jan 2010 10:52:11 -0800=2C Raj <rajiv468(a)GMAIL.COM> wrote:
>=20
> >Hi=2C
> >
> >Im using SAS on Z/OS. I have advanced excel where i usually copy and
> >paste the values from SAS table to excel.(because formulas get
> >disturbed)
> >Can anyone suggest me how to automate this.
> >
> >Regards=2C
> >Tumu
=20
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you=92re up to on=
Facebook.
http://go.microsoft.com/?linkid=3D9691816=