BookmarkSubscribeRSS Feed
ActuaryJo
Calcite | Level 5

This program (in the eLearning course) is supposed to produce an excel workbook with three Detail tabs and the Season should be 2014, 2015, 2016. This is true when I run the SAS report, but the excel sheet headings are 2014, 2014, 2014 (see screenshot). I even tried running the solution and it was still incorrect. I am running this in SAS EG 7.1  with SAS 9.4 (9.0401M2). I'm not sure what the problem is, it may be an update is needed? The data is correct, just the headings are wrong.

Thank you.

 

p106p01.sas:

---------------------------------------------------------

ods excel file="&outpath/StormStats.xlsx"
style=snow
options(sheet_name='South Pacific Summary');
ods noproctitle;

proc means data=pg1.storm_detail maxdec=0 median max;
class Season;
var Wind;
where Basin='SP' and Season in (2014,2015,2016);
run;

ods excel options(sheet_name='Detail');

proc print data=pg1.storm_detail noobs;
where Basin='SP' and Season in (2014,2015,2016);
by Season;
run;

ods excel close;
ods proctitle;

 

3 REPLIES 3
JBailey
Barite | Level 11

Hi @ActuaryJo

 

I just ran the solution and it worked fine for me. Perhaps restarting your SAS session will help.

 

Best wishes,

Jeff

@JBailey

ActuaryJo
Calcite | Level 5

Hi!

 

I tried it several different times to see if it was just a fluke, it doesn't seem to be the session. It produces the correct Season headers in the SAS report, just not in the excel. The code I posted is the solution, so I'm not surprised it works. A friend going through the course with me is using the University Edition and has no problem either.

 

I appreciate the suggestion though, worth trying for sure!

Panagiotis
SAS Employee

Hm that is weird. I took your code and tested it and it works for me. I even check the first few rows for each year in your workbook and they look accurate. The by statement in the frequency procedures is working. Why your titles aren't changing I am not sure of yet.

 

 

Do me a favor and check your SAS output not the Excel file. How does it look in your results tab? You should see the year breaks like this:

 

test.png

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

5 Steps to Your First Analytics Project Using SAS

For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1765 views
  • 0 likes
  • 3 in conversation