The SAS Output Delivery System and reporting techniques

Question about TEMPLATE with Excelxp

Reply
Occasional Contributor
Posts: 5

Question about TEMPLATE with Excelxp

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
SAS Super FREQ
Posts: 8,743

Re: Question about TEMPLATE with Excelxp

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
Ask a Question
Discussion stats
  • 1 reply
  • 121 views
  • 0 likes
  • 2 in conversation