BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
IgawaKei29
Quartz | Level 8

So I have been looking at this issue over and over and I am still not 100% sure how to get this to work.  I have 7 data sets that I need to place on one Excel sheet (sorta like a template).  I understand with ODS how to put these on separate sheets, but not sure how to put these all on one spreadsheet.

 

Thanks for any guidance on this. 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:
Look for previous postings about the use of ODS EXCEL and the (sheet_interval='none') suboption.

Here's a quick example using just a few rows out of 3 different datasets.

ods excel file='c:\temp\all_together_now.xlsx'
    options(sheet_interval='none');

  proc print data=sashelp.class(obs=3);
  run;

  proc print data=sashelp.cars(obs=3);
    var make model type enginesize msrp invoice;
  run;

  proc print data=sashelp.shoes(obs=3);
    var region subsidiary product sales inventory returns;
  run;

ods excel close;



Hope this helps,
Cynthia

View solution in original post

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi:
Look for previous postings about the use of ODS EXCEL and the (sheet_interval='none') suboption.

Here's a quick example using just a few rows out of 3 different datasets.

ods excel file='c:\temp\all_together_now.xlsx'
    options(sheet_interval='none');

  proc print data=sashelp.class(obs=3);
  run;

  proc print data=sashelp.cars(obs=3);
    var make model type enginesize msrp invoice;
  run;

  proc print data=sashelp.shoes(obs=3);
    var region subsidiary product sales inventory returns;
  run;

ods excel close;



Hope this helps,
Cynthia

IgawaKei29
Quartz | Level 8

Thank you Cynthia, that sheet_interval=none was the piece I was missing.  Do you know if it is possible to direct SAS where to place the data on the sheet?  That was also something I saw a few articles about, but was confused how to implement.

 

Appreciate your help on this, now I can be more SAS dangerous 🙂

Cynthia_sas
SAS Super FREQ
Hi, you'll have to search in the ODS EXCEL documentation. I believe there is a "start_at" suboption, but it applies to where the WHOLE sheet should start, you can't place one value in column B row 3 and another value in column D row 5, if that's what you're thinking of.

Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 577 views
  • 0 likes
  • 2 in conversation