I have an updated tagset that will allow this to work. But justification has
been an issue, as are style attribute over rides as you show them.
To simplify usage, and the XML generated, the way to make this work, with the tagset you have is to create a style element.
proc template;
define style styles.mystyle;
parent = styles.default;
style data_c from data/
just=c
;
end;
run;
Then in your proc print,
PROC PRINT DATA=ALLEVT NOOBS LABEL SPLIT='/';
WHERE FSTATRES = "US&RPTST" AND EVENT = "&EVT";
VAR YEAR / style=data_c;
VAR FSTATOCC;
VAR FILENO / style=data_c{tagattr="format:000000"};
VAR FSTATRES FCNTYRES;
VAR DATE / style=data_c;
You could create yet another style element with the tagattr="format:000000" in it as well.
Over-rides like this, except for tagattr, and just, vjust, can cause the style section of the Excel XML to grow to tremendous size. To keep that under control, just and vjust is ignored. tagattr settings of format, formula and rotate are treated differently since they are more manageable.
Creating style elements with the settings you need is the best way to work
with the excel tagset. The proc print code benefits from being a little simpler since it is always a style name you are referencing.
Just and vjust are particularly difficult since it can't be known if they are an over ride or just the current setting. The latest version of the tagset works around this problem by creating alternate styles for almost everything,
data_c, data_l, data_r, header_c, header_l, header_r, etc. It is verbose, but
it is manageable.
The new tagset should be available on the web next thursday.