BookmarkSubscribeRSS Feed
jackieme
Calcite | Level 5
ods word file="\test.docx";
ods escapechar="^";
proc report data=final1 nowd
	style(report)=[verticalalign=middle cellspacing=0 width=100% bordercolor=black]
	style(header)=[background=white verticalalign=middle just=center bordercolor=black borderbottomstyle=hidden]
	style(column)=[just=center];

	columns ("^S={borderbottomstyle=hidden bordertopstyle=hidden}Group" grpvar) ("Total A and B^{super a}" ("A" a1 a2) ("B" b1 b2));

define grpvar/display " " style(column)=[just=left] style(header)=[bordertopstyle=hidden];
define a1/display "A1";
define a2/display "A2";
define b1/display "B1";
define b2/display "B2";
run;
ods word close;

I am having trouble removing the line above the "Group" cell in the table below when creating .docx output, but I am able to create it with .rtf output. 

current output:

jackieme_0-1655908676206.png

desired output:

jackieme_1-1655908793371.png

Thank you!

1 REPLY 1
ballardw
Super User

ODS Word is preproduction which means that things sometimes don't work as expected.

 

If you can get the output you want with RTF then use RTF. I have found in my limited attempts with ODS Word that anything except extremely simple tables seems to have an issue with one or more of the complications.

 

Also, please double check your posted proc report code. I tried substituting a data set I had for yours get errors with the Columns statement with a missing )

 

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

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
  • 1 reply
  • 638 views
  • 1 like
  • 2 in conversation