BookmarkSubscribeRSS Feed
Konkordanz
Pyrite | Level 9

Hi,

 

I want to export my proc-report-outputs into a excel-file. What I not want is the result of following code. Each output gets its own spreadsheet.

What I want is: Both results of output1 should be exported into the spreadsheet "sex". And the both results of Output2 should be exported into the spreadsheet "age". I dont know how to get this result. I dont get it neither if I would use the same sheet_name per output. Why? Thank you for help!

 

 

/*Exportpath*/
ods excel file="...path\Ergebnisse.xlsx"

/*=====================================*/
/*==========  output1 ==================*/
/*=====================================*/


options(sheet_name="sex_sum" embedded_titles='Yes');

/*Absolut*/
proc report 
[...]
run; ODS excel options(sheet_name="sex_rel" embedded_titles='Yes'); /*relative*/ proc report
[...]
run;


/*=====================================*/ /*========== output2 ==================*/ /*=====================================*/ options(sheet_name="age_sum" embedded_titles='Yes'); /*Absolut*/ proc report
[...]
run; ODS excel options(sheet_name="age_rel" embedded_titles='Yes'); /*relative*/ proc report
[...]
run;

 

 

1 REPLY 1

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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