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

Hi everyone!

I have to print out a huge cross table. Unfortunately SAS doesn't respond any more when I try to execute it. So, how can I suppress the output in SAS and create the excel sheet only?

 

ODS EXCEL FILE="myfile.xlsx" options(frozen_headers="6" embedded_titles="yes"); 
TITLE "My Title";
ODS EXCEL options(sheet_name="Sheet name");

proc tabulate;
class ... ;
table ... ;
format ... ;
run;
ODS EXCEL CLOSE;
1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @dstuder 

 

You can close all ODS destination before the ODS excel statement:

ods _all_ close;

ODS EXCEL FILE="/home/u41058973/sasuser.v94/myfile2.xlsx" options(frozen_headers="6" embedded_titles="yes"); 
TITLE "My Title"; 
  ODS EXCEL options(sheet_name="Sheet name");

...
ODS EXCEL CLOSE;

Best,

View solution in original post

1 REPLY 1
ed_sas_member
Meteorite | Level 14

Hi @dstuder 

 

You can close all ODS destination before the ODS excel statement:

ods _all_ close;

ODS EXCEL FILE="/home/u41058973/sasuser.v94/myfile2.xlsx" options(frozen_headers="6" embedded_titles="yes"); 
TITLE "My Title"; 
  ODS EXCEL options(sheet_name="Sheet name");

...
ODS EXCEL CLOSE;

Best,

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 921 views
  • 2 likes
  • 2 in conversation