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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 961 views
  • 2 likes
  • 2 in conversation