Hello,
I have a very weird issue with ODS Excel.
I put ODS Excel code section in front of proc sql and several proc freq. After running the program, I don't get any excel file, nothing coming out. Log doesn't say anything either.
Then I only marked and run the top part of "ODS Excel file=..." code again, it gave me the excel file.
What is this problem? How to fix it to generate the excel file right away after the running of the program.
Thank you so much for your help!
Here is my SAS codes:
ods excel file="c:\....xlsx" options (...);
proc sql;
create table a1 as
select *
from *;
quit;
ods excel options(sheet_interval="proc" sheet_name="Table 1";
proc freq data=a1;
title1 "Table 1"
table col1;
run;
ods excel options(sheet_interval="proc" sheet_name="Table 2";
proc freq data=a1;
title1 "Table 2"
table col2;
run;
ods excel close;
Post the log.
@ply20051 wrote:
Hello,
I have a very weird issue with ODS Excel.
I put ODS Excel code section in front of proc sql and several proc freq. After running the program, I don't get any excel file, nothing coming out. Log doesn't say anything either.
Then I only marked and run the top part of "ODS Excel file=..." code again, it gave me the excel file.
What is this problem? How to fix it to generate the excel file right away after the running of the program.
Thank you so much for your help!
Here is my SAS codes:
ods excel file="c:\....xlsx" options (...);
proc sql;
create table a1 as
select *
from *;
quit;
ods excel options(sheet_interval="proc" sheet_name="Table 1";
proc freq data=a1;
title1 "Table 1"
table col1;
run;
ods excel options(sheet_interval="proc" sheet_name="Table 2";
proc freq data=a1;
title1 "Table 2"
table col2;
run;
ods excel close;
Sorry. This time it works. I run it twice and it works.
Your code has errors so I would still suggest checking your log and fixing any issues.
Got you. I will look into my log to fix the errors.
May I know what errors you saw?
Thank you so much!
I forgot typing in ")" in ods options.
Thank you!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.