Data visualization with SAS programming

Setting no fill color in ExcelXP output

Reply
Occasional Contributor
Posts: 18

Setting no fill color in ExcelXP output

I'm trying to put together output to a multi-sheet Excel workbook using the ExcelXP tagset and custom style(s). I've just about got everything the way I want it, but one thing has puzzled me. A new workbook in Excel has no background fill color. SAS ODS (XML) output Excel has a default background fill color of white. While a minor point, it has caused some questions by the users to whom I have presented interim results.

And I never remember to ask the question when I'm at work, so I don't have SAS, or my code, here. I'm assuming I need to specify something for the Document (or maybe Body or Pages?) style element in my style(s), but I'm not sure how to tell it the color should be "nothing." Light Goldenrod or Tomato sure, but "null" ??
SAS Super FREQ
Posts: 8,645

Re: Setting no fill color in ExcelXP output

Hi:
This isn't really a question for the SAS/GRAPH and ODS Graphics forum. This would be better addressed in the ODS and Reporting forum.

However, when you change a style template and you want to turn off a style attribute value, you generally use the _UNDEF_ value for the style attribute.

I'm not sure that Document is the right style element to change, however. If you look at this paper on customizing a style template for use with TAGSETS.EXCELXP, you might find some pointers that will help you.
http://www2.sas.com/proceedings/forum2008/036-2008.pdf

I'm not sure, also, what you mean by "Excel has a default background fill color of white." Generally, the way that your output is defined in the TAGSETS.EXCELXP XML is for the interior table lines to show only around the data cells in the tabular output created by SAS. so, for example, if I use PROC PRINT on SASHELP.CLASS, I see interior table lines around OBS, NAME, SEX, AGE, HEIGHT and WEIGHT variables for 19 rows, plus a header row, but I do not see interior lines in any of the rest of the worksheet. I believe this behavior is working as designed. You might want to check with Tech Support.

I know that there is a GRIDLINES sub-option which turns on the printing of GRIDLINES for the print area. But I don't think this is what you mean.

cynthia
Occasional Contributor
Posts: 18

Re: Setting no fill color in ExcelXP output

Yep, put this in the wrong section of the forum. :-(

I'll mess around with it some more and if I can't figure it out I'll post in the correct section.
SAS Super FREQ
Posts: 8,645

Re: Setting no fill color in ExcelXP output

Hi:
As I said, ODS by default only shows interior lines around the table that it produces. So if your table is only 4 columns wide, you will not normally see "lines" beyond the 4th column in the worksheet. Changing background color will not impact the worksheet outside of the table created by SAS. This is the design of how interior table lines work.

You may want to work directly with Tech Support to see whether this is even changeable behavior or not.

cynthia
Post a Question
Discussion Stats
  • 3 replies
  • 426 views
  • 0 likes
  • 2 in conversation