BookmarkSubscribeRSS Feed
ply20051
Calcite | Level 5

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;

 

 

5 REPLIES 5
Reeza
Super User

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;

 

 


 

ply20051
Calcite | Level 5

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

 

 

Reeza
Super User

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

ply20051
Calcite | Level 5

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

 

May I know what errors you saw?

 

Thank you so much!

ply20051
Calcite | Level 5

I forgot typing in ")" in ods options. 

 

Thank you!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1669 views
  • 0 likes
  • 2 in conversation