I have been tasked with outputting data processed in SAS to Word documents, to which the recipients have provided examples of how they would like the output tables to look. I have been using ods tagsets.rtf to create the Word output so far mostly with success, however I've run into a snag that has been hard to search for a solution to. The output I need is a proc tabulate table, and the desired format is to have gridlines around all of the classes/headers, but only column gridlines for the data. The example provided does not have row gridlines for the row class or the data rows. Using a style template, I was able to produce the appropriate gridlines around the elements on top of the proc tabulate, however the row headers also have gridlines which I do not desire. I tried using style options on the class itself but this didn't work in adding nor in removing gridlines. Attached is a screengrab with boxes highlighting the gridlines I would like to remove, and my code is below. For a bonus, if anyone knows if I can get "State" in the screengrab centered at the bottom of the box instead of full center that would help as well! This is my template for the style, followed by the ods and proc tabulate snippet: : proc template;
define style Styles.smaller;
parent = styles.rtf;
style Table from output / borderspacing=0 Rules=cols;
style header from headersandfooters / background=white borderbottomwidth=1pt;
end;
run;
ods tagsets.rtf file="&something.doc"
style=styles.smaller startpage=now;
proc tabulate data=ppwfps2;
class state;
class a b c / DESCENDING;
var v;
table state=' ', (a=' ')*(b=' ')*(c=' ')*v=' '
/ BOX='State';
keylabel sum = ' '; *Remove sum label from table.;
run;
... View more