BookmarkSubscribeRSS Feed
Sticky
Fluorite | Level 6

Hi found a problem with ODS word with Proc ttest. when you have more than one analysis variable the title doesn't change from the first one.

For example if you have code something like this:

ods word file='junk.docx';

proc ttest data=screen;
var SCREEN_B_WDHR SCREEN_B_WEHR;
class NAPLAN3_R_NMS;
title 'Screen time ';
run;

ods word close;

When the analysis variable changes to SCREEN_B_WEHR the title still says the first variable, ie SCREEN_B_WDHR, which makes the output confusing to read.

 

It can be overcome by including the option 'options(body_title="yes")' in the ODS word statement, but that seems a bit clunky.

For it to work it would need a section break when the variable changes.

Regards

R

3 REPLIES 3
ballardw
Super User

ODS Word is preproduction. That means it is still in testing and development.

 

Use ODS rtf instead. Use your word processor software to open and save as if you need Docx file format.

 

 

Sticky
Fluorite | Level 6

Its been preproduction for quite a while now.

R

Sticky
Fluorite | Level 6

The same occurs with ODS EXCEL even though every table is on a separate sheet. ODS excel is not labelled preproduction so I would call this a bug.

R

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 978 views
  • 0 likes
  • 2 in conversation