BookmarkSubscribeRSS Feed
Fluorite | Level 6
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" ??
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.

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.

Fluorite | Level 6
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.
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.




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2 in conversation