LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 27 Jan 2005 09:05:55 -0800
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: SAS -> Excel trick
Comments: To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>

Nice tips Richard!

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Richard A. DeVenezia Sent: Wednesday, January 26, 2005 8:17 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SAS -> Excel trick

Michael S. Zdeb wrote: > Hi...one question...is VIEW IN EXCEL part of BASE SAS or does one > have to > license ACCESS TO PC FILE FORMATS to make this work? >

Mike:

No. If you examine the results of the SAS Explorer action, you will see it does a ODS HTML Proc Print and starts Excel opening the just created html file.

Click in Explorer. Menu Tools/Options/Explorer... Members (combo item in v8, tab in v9) Select Table Click Edit

You will see 'Vie&w in Excel' has this Command Action: AFA C=SASHELP.EXPLORER.EXCEL_TABLE_OPEN.SCL LIBRARY='%8b' TABLE='%32b';

[ I have started calling the little programs that Command Actions: are/do/run SASPPLETs. I hope to add a section to my website in the coming months, detailing 30 or so useful saspplets ]

The SCL program submits this SAS code (as noted in the log when you do the action, you can also RECALL the submitted statements and see them in the editor) filename _temp_ "d:\temp\saswork\_TD1644\#LN00014.xls"; ods noresults; ods listing close; ods html file=_temp_ rs=none style=minimal; proc print data=Sashelp.'Class'N noobs; run; ods html close; ods results; ods listing; filename _temp_; dm "winexecfile ""d:\temp\saswork\_TD1644\#LN00014.xls"" ";

Apparently SAS in more comfortable in distributing SAS code wrapped in a SCL entry than just the Base code. Theoretically, the Command Action: could be gsub '%%include !SASROOT/saspplet/ViewInExcel.sas;'

Of course SCL gives the opportunity to use the SAS Explorer 'thing' being acted on as an input to a GUI rich dialog. I see saspplets as having a very strong growth as more people become aware of how to make and use them.

[ A little tangent on 'recalling' things. If the action performed by some _menu_ choice is to issue a command {sometimes not documented}, you can discover the command as follows. Switch to COMMAND MODE (type COMMAND in the command box, the window gets a command line. In the command line, type ? and enter to see the previous command issued to the window. Each ? takes you back one more command ]

-- Richard A. DeVenezia http://www.devenezia.com/


Back to: Top of message | Previous page | Main SAS-L page