BookmarkSubscribeRSS Feed
LukeL
Obsidian | Level 7

Hi all, I have a problem with proc report.

I'm writing an excel (tagset.excelxp, on 9.4M1) and have on a same sheet three tables generated by a proc report with a by.

I would like to have just one title for those tables, but the report with the by group write it for each one (either with embed_titles* options enabled.

Is there a way to tell the proc report to write titles only once, or the only way is to write each table manually?

 

Thanks 🙂

5 REPLIES 5
ChrisNZ
Tourmaline | Level 20

Could you write some ods text and remove the titles?

LukeL
Obsidian | Level 7

Hi, as far as I know, excelxp does not support ods text, isn't it?

 

Also, a way to force the title output would be good, since I could put the title, force it, then delete the title and make the report...

andreas_lds
Jade | Level 19

With tagset.excelxp you don't create excel-files but xml-files that can be read by excel. Unfortunately switching to ods excel is no option, because you are using an old version of 9.4, upgrading to at least m5 is highly recommended.

 

You may want to post the code you are using, would make it so much easier to suggest something useful.

LukeL
Obsidian | Level 7

I'm trying to convince customer to update the M1 since almost 4 years...but still here 😞

The code is quite simple

proc sort data=sashelp.class out=TEST;
    by SEX;
run;

title "Some title referred to M and F";

proc report data=TEST missing;  
    by SEX;
    columns NAME AGE;
    define NAME / group;
    define AGE / mean;
run;

Same code is used to produce an xml/xls or a pdf, so the solution should be not tightened to the output. For now just write some macro code that get all the by group value and itearate over it...

Cynthia_sas
SAS Super FREQ

Hi:

  TAGSETS.EXCELXP does have an Embed_Titles_Once suboption, but it did not work for me with your PROC REPORT. This Tech Support note explains that the option is problematic: https://support.sas.com/kb/46/620.html .

 

  However, when I tried Embed_Titles_Once with ODS EXCEL, that suboption worked for me with a version of your code. I created a subset of the sorted data to make everything fit in one screen shot.

Cynthia_sas_0-1626891439619.png

 

  I wasn't sure what you wanted, but asking for the mean AGE for every name didn't make sense, unless you wanted to see the Overall Mean at the bottom of the list for each group.

 

Cynthia

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 977 views
  • 1 like
  • 4 in conversation