Stored Process Output in SAS Add-in to Microsoft Excel

0

Running a stored process (or STP) is a SWEET thing! All of my users are using the limited number I have made available, and I'm sure many new STPs will be written as soon as the users realize how easily they can be created.

When first writing an STP for Excel however, I was a bit baffled. The resulting dataset from my STP query was not automatically returned into the Excel Spreadsheet. I guess, similar to SAS Base, the table is in the work library, but you need explicitly open it. Well, I then started looking for the table created by the STP to view in Excel. No such luck - and when thinking about my user community - this wasn't a great plan. Therefore the proc print came in handy!

At the end of my STP, I simply wrote proc print; run; This outputs the last data set into the excel viewer. Beware! If a user runs this from Internet Explorer, the view isn't pretty. If you are into multiplicity, be sure to write in some conditional code to output pretty for those Web reports, but do a data dump into excel. (I see this post in my future.)

Share

About Author

Angela Hall

Senior Technical Architect

Angela offers tips on using the SAS Business Intelligence solutions. She manages a team of SAS Fraud Framework implementers within the SAS Solutions On-Demand organization. Angela also has co-written two books, 'Building BI using SAS, Content Development Examples' & 'The 50 Keys to Learning SAS Stored Processes'.

Comments are closed.

Back to Top