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

I use ods excel and proc report to save the results to excel file.

 

part of the codes look like:

 

Macro:

ods excel %IF &state=1 %THEN

file="\walter\3_10\&outexcel..xlsx";

cssstyle="style.css"

options (embedded_titles = 'yes' embedded_footnotes='yes' title_footnote_nobreak='off'

sheet_interval="table" sheet_name="T3.10.09&statename.");

 

footnote;

 

proc report data=datasheet1 split='@' style(header)=higherlevel{borderwidth=0.3};

 

 

I run this macro 6 times. But only save 5 sheets.

 

what happened?

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

Have you tried adding this statement at the end of your PROC REPORT:

 

run;

View solution in original post

3 REPLIES 3
Astounding
PROC Star

Have you tried adding this statement at the end of your PROC REPORT:

 

run;

walterwang
Obsidian | Level 7
yes it works.
Reeza
Super User
Where's the ODS CLOSE statement? Or the RUN?
Do you have more %IF conditions? Are they all being evaluated correctly?

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

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1215 views
  • 4 likes
  • 3 in conversation