BookmarkSubscribeRSS Feed
FaisalD
Calcite | Level 5
I'm trying to figure out all the different style definitions there are for excelxp and ones which i can control. Is there a listing of them all anywhere?

Incase I'm not clear here is a example:

proc template;
define style styles.mystyle;
parent=styles.default;

style data /
FONT_FACE='MS Serif';


end;
run;

I am specifically talking about the data part in bold. My understanding is you can create your styles by defining different "style definitions" with style attributes?

Do I have this correct?

Thanks
Faze
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
ExcelXP does NOT have a particular style definition that it works with, not like RTF or PDF. If there were ANY style definition that I would start with for ExcelXP, I would look at STYLES.DEFAULT as the style template to start with.

However, from your question, it seems that you are interested in knowing which style ELEMENTS and style ATTRIBUTES you can change. In this example of proc template code:
[pre]
style data /
foreground=black
background=white;
[/pre]
DATA is a style ELEMENT
FOREGROUND and BACKGROUND are style ATTRIBUTES

But, it doesn't exactly matter what your destination is. What SAS is creating are primarily TABLES from SAS procedures and tables themselves are pretty simple.

The column headers are controlled by the HEADER style element; the data cells by the DATA style element (or sometimes by the CELL style element) and the TABLE itself (interior table lines, borders etc) is controlled by the TABLE element (or sometimes by the OUTPUT element). The background that the table is sitting on is generally controlled by the BODY element.

These previous forum postings may be useful to you:
http://support.sas.com/forums/thread.jspa?messageID=6386ᣲ
http://support.sas.com/forums/thread.jspa?messageID=4032࿀
http://support.sas.com/forums/thread.jspa?messageID=4184ၘ

What I have found when working with the ExcelXP tagset is that most of the straightforward elements -- HEADER, DATA, TABLE and the straightforward attributes -- BACKGROUND, FOREGROUND, RULES are respected by Excel when you use a particular style template change with the ExcelXP tagset.

When you change a template and use it with ExcelXP -- I recommend making one change at a time -- so you know what is working and what isn't working. The Tech Support FAQ on PROC TEMPLATE will be of great help to you (listed in the previous postings). If you have specific style element and ExcelXP behavior issues, your best bet for a quick response may be to contact Tech Support for further help.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 922 views
  • 0 likes
  • 2 in conversation