BookmarkSubscribeRSS Feed
JSWilson64
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" ??
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
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
JSWilson64
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.
Cynthia_sas
SAS Super FREQ
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2242 views
  • 0 likes
  • 2 in conversation