The SAS Output Delivery System and reporting techniques

ODS Excel won't work

Reply
New Contributor
Posts: 4

ODS Excel won't work

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;

 

 

Super User
Posts: 22,818

Re: ODS Excel won't work

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;

 

 


 

New Contributor
Posts: 4

Re: ODS Excel won't work

Sorry. This time it works. I run it twice and it works.

 

 

Super User
Posts: 22,818

Re: ODS Excel won't work

Your code has errors so I would still suggest checking your log and fixing any issues.

New Contributor
Posts: 4

Re: ODS Excel won't work

Got you. I will look into my log to fix the errors.

 

May I know what errors you saw?

 

Thank you so much!

New Contributor
Posts: 4

Re: ODS Excel won't work

I forgot typing in ")" in ods options. 

 

Thank you!

Ask a Question
Discussion stats
  • 5 replies
  • 258 views
  • 0 likes
  • 2 in conversation