BookmarkSubscribeRSS Feed
sugita
Calcite | Level 5

Hi,

I have several process and querries in sas EG that will produce a separate excel file (or csv)

I was wondering if there is a way in sas to combine all of these excel files into one single excel file with multiple worksheet that represent each and every original excel file.

2 REPLIES 2
Mzee
Calcite | Level 5

Read the article, it might help in what you are thinking of doing.

http://support.sas.com/resources/papers/proceedings12/150-2012.pdf


robby_beum
Quartz | Level 8

I use EG 4.3 and write PROC EXPORT statements pretty much all the time. In the following examples, it writes to the same excel file "Output_Listing.xls" creating multiple worksheets...hope this helps:

code here...

proc export data=P06.what_I_have
   outfile="\\Server01\Reports\directories\output\Output_Listing.xls"
   dbms=excelcs replace;
   sheet="Worksheet 1";
   SERVER='server_name';
   PORT=9621;
run;


more code here or even another program...


proc export data=P06.what_I_have2
   outfile="\\Server01\Reports\directories\output\Output_Listing.xls"
   dbms=excelcs replace;
   sheet="Worksheet  2";
   SERVER='server_name';
   PORT=9621;
run;

more code here or even another program...


proc export data=P06.what_I_have3
   outfile="\\Server01\Reports\directories\output\Output_Listing.xls"
   dbms=excelcs replace;
   sheet="Worksheet  3";
   SERVER='server_name';
   PORT=9621;
run;

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1326 views
  • 0 likes
  • 3 in conversation