BookmarkSubscribeRSS Feed
Florent
Quartz | Level 8
Dear all,

Would anyone know how to easily generate a multi-sheets Excel file from multiple datasets by using SAS 8.2 ? One dataset corresponding to one worksheet in Excel. It should act as the SHEET option of the PROC EXPORT on SAS 9.

In addition I'd like to find a solution which does not require Excel to be opened and the Excel File to exist before executing the SAS code.

I've already read a lot of topics on the internet but none gave me the expected results.

Thank you in advance for helping me out.

Kind regards,
Florent.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Florent:
In SAS 8.2, you only have ODS HTML available to you. By default, ODS HTML will create one worksheet for EVERY ODS sandwich:
[pre]
ods html file='allinone.html' style=sasweb;
proc print data=file1; run;

proc print data=file2; run;

proc print data=file3; run;
ods html close;
[/pre]

However, using Microsoft's design for linking separate HTML files together, you can make one workbook that uses each HTML file for a separate worksheet., as described in these previous forum postings (sorry, I don't know how "easy" this is -- but I have made it work):
http://support.sas.com/forums/thread.jspa?messageID=18828䦌
http://support.sas.com/forums/thread.jspa?messageID=8132ῄ
http://support.sas.com/forums/thread.jspa?messageID=12780㇬ (#2 item)

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Discussion stats
  • 1 reply
  • 707 views
  • 0 likes
  • 2 in conversation