Hi,
I have a question about controlling style options with PROC REPORT and ODS EXCELXP tagsets.
I am using SAS 9.4 (M2) and I output my PROC REPORT results to EXCEL using EXCELXP tagsets.
Here is my output and I am having following issues:
This is the output I would like to have:
Thank you for the help.
THE CODE IS IN THE ATTACHMENT (code.txt).
Similar, just use style background [color=blue]
If combining you only need one STYLE but you have multiple options
Style background [color=blue] foreground [color=red]"text"
Look in the reference for style options you have things like font size, weight (bold and such) borders (where appropriate) justification (left right center)
I think you want to repost your code and possibly in the insert code window (look at the {i} or SAS run icon in the menu of the display. It looks like some of your code may be getting eaten by HTML interpretter (at least in my view) as there are man missing closing brace and parentheses.
Thank you Ballardw for pointing this out.
I have now posted the code as an attachement. Hopefully that will work and people will be able to see the code.
See if this helps:
ods tagsets.excelxp file = "D:\data\shoes_test.xml" style = styles.mystyle options (orientation ='landscape' autofit_height ='yes' ); ods escapechar='~'; PROC REPORT DATA=SASHELP.SHOES(obs=5) SPLIT="/" nowd ; COLUMN ("EAST COAST" "~{style foreground [color=red fontweight=bold]Eastern States~{super 1}}" Region Product Subsidiary) ("WEST COAST" "~{style foreground [color=red fontweight=bold]Western Stores~{super 2}}" Sales Inventory Returns ); DEFINE Region / DISPLAY "~{style foreground [color=red fontweight=bold]Region~{super 3}}" ; DEFINE Product / DISPLAY "Product" ; DEFINE Subsidiary / DISPLAY "Subsidiary" ; DEFINE Sales / SUM "Total Sales" ; DEFINE Inventory / SUM "Total Inventory" ; DEFINE Returns / SUM "Total Returns" style(header)={background=light grey}; RUN; ods tagsets.excelxp close;
This works. Thank you ballardw.
I also want to add the background color to the "Eastern States" - let's say a blue color. I am having difficultly with the syntax to add the background. Is there a way to add background color?
Similar, just use style background [color=blue]
If combining you only need one STYLE but you have multiple options
Style background [color=blue] foreground [color=red]"text"
Look in the reference for style options you have things like font size, weight (bold and such) borders (where appropriate) justification (left right center)
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.
Ready to level-up your skills? Choose your own adventure.