Hi:
Look on pages 21, 22, 23 of this paper for information about constructing the type of Microsoft format for positive and negative numbers, etc:
http://support.sas.com/resources/papers/proceedings09/016-2009.pdf
I'll address the TABULATE placement question and leave you to play with the correct format.
To answer your placement question, let's look at a sample PROC TABULATE program that's changing a lot of background colors. I know that you do not want to change background colors, but go with me down this road:
[pre]
ods tagsets.excelxp file='c:\temp\class.xls' style=sasweb;
proc tabulate data=sashelp.class;
class age sex / style={background=pink};
classlev age / style={background=green};
classlev sex / style={background=red};
var height /style={background=cyan};
table age,
sex*height*mean*{style={background=yellow}}
/ box={label='BOX' style={background=cxdddddd}};
keyword mean / style={background=black};
run;
ods tagsets.excelxp close;
[/pre]
What you will see if you run this program is that the output is quite colorful. However, you can determine, from every different color, exactly which STYLE= override impacts which piece of the TABULATE output. So, for example, the style override on the VAR statement only impacts the column HEADER for the HEIGHT variable, just as the style override on the CLASS statement only impacts the HEADERS for the AGE and SEX variables.
If the statistic resulting from the dimension
sex*height*mean crossing with the class variable AGE is what you want to impact with a TAGATTR style override (what will be shown in YELLOW in the final output) -- then that (the TABLE statment usage) is the place where you put the TAGATTR reference (once you figure out the right way to construct the TAGATTR string).
You are correct that there is a slight difference in how the STYLE override is specified in the CLASS or VAR statements versus in the TABLE statement. If you think about it, it makes sense... what if, in a SAS dataset, you had a variable called
STYLE so how would you distinguish the variable STYLE from the STYLE= in the override part of the specification??? It's no problem in the CLASS or VAR statement, because the ODS STYLE reference comes after a slash. But, in the TABLE statement, you need an extra set of curly braces (or square brackets) to let ODS know that everything within the outer curly braces is a STYLE override.
cynthia