Date: Thu, 11 Sep 2003 14:25:38 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: DDE and PAGE.SETUP
Content-Type: text/plain
Kevin -
This works for my test sheet...maybe something is wrong with your Excel or
SAS install. (BTW - you can't go to preview on an empty datasheet, but you
can use page setup.)
filename cmds dde 'excel|system';
%let i=Sheet2;
data _null_;
file cmds;
put %unquote(%str(%'[workbook.activate%(%"%trim(&i.)%"%)]%'));
put '[zoom(65)]';
put '[PAGE.SETUP( , , 3, , 3)]';
put '[SAVE()]';
put '[QUIT()]';
run;
Paul Choate
DDS Data Extraction
-----Original Message-----
From: Kevin Roland Viel [mailto:kviel@EMORY.EDU]
Sent: Thursday, September 11, 2003 2:11 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: DDE and PAGE.SETUP
Quoting "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>:
> data _null_;
> file cmds;
> put '[PAGE.SETUP( , , 3, , 3)]';
> put '[SAVE()]';
> put '[QUIT()]';
> run;
Paul,
Thanks. Seems you have been covering me lately :)
I get an I/O message. However, with Excel, I cannot view Print Preview
or
Page Setup manually. Perhaps my problem lies there. A partial log follows.
535 data _null_;
536 file xl_sys;
537 put %unquote(%str(%'[workbook.activate%(%"%trim(&i.)%"%)]%'));
538 put '[zoom(65)]';
539 put '[PAGE.SETUP( , , 3, , 3)]';
/* Clipped */
568 run;
NOTE: The file XL_SYS is:
DDE Session,
SESSION=Excel|system,RECFM=V,LRECL=256
ERROR: DDE session not ready.
FATAL: Unrecoverable I/O error detected in the execution of the data step
program. Aborted during the EXECUTION phase.
NOTE: 2 records were written to the file XL_SYS.
The minimum record length was 10.
The maximum record length was 25.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.00 seconds
Thanks,
Kevin
Kevin Viel
Department of Epidemiology
Rollins School of Public Health
Emory University
Atlanta, GA 30322
|