ODS ExcelXP: Tag Attr Is It! Using and Understanding the TAGATTR= Style Attribute with the ExcelXP Tagset

ODS ExcelXP: Tag Attr Is It! Using and Understanding the TAGATTR= Style Attribute with the ExcelXP Tagset


The ODS ExcelXP tagset has many options to change its behavior. Many are set with the options in the ODS statement. There are others that must be set through the style. Most of these are set in the TAGATTR= style attribute, an unused, leftover attribute from SAS® Release 7.01. This paper will show how to use the TAGATTR= style attribute to control the ExcelXP tagset in order to change the type, format, formula rotation, hiding, merging, and wrapping of cells, rows, and columns. This paper will also go behind the scenes to show how the tagset handles these settings and manages the problems presented by the XML that the tagset must create. 

This is a rather geeky paper in which you may find just what you are looking for and ignore the rest.  The TagAttr style attribute controls many things in the ExcelXP tagset. Among them, variable format, type, rotation, hiding and  merging are the most common. This paper goes on to explain how these options actually work in case someone possibly had a need to create their own.

TagAttr is extremely powerful and also very difficult to use because it is a style attribute that can be applied in a very specific way to a single cell in a spreadsheet. When you need that kind of control there is no substitute. But the code can be complicated all the way down there at the render cell level. 

This and my HTML Evolution paper were the last papers I wrote as an employee of SAS. It is, perhaps, appropriate that this is my last paper for them. I'm not 'It' anymore. I doubt that anyone will be taking my place as a voice which is willing to open the doors to the kingdom. It's up to you now. Tag! You're it!

I'll be continuing in my own direction, and sharing my knowlege along the way. Until then, this marks the end of an era for me. I can wait to write my next paper!

I hope this paper and the example code are useful to you. As always, I'm a bit disappointed in the pdf version of these slides, but they are better than nothing. The Keynote version is so much more communicative.

Get the paper and the example code!

Everything is available in my GitHub repositories.

This paper, as with all of my SAS papers, is available from my SAS-Papers github repository. The example code for this paper can be found in my SAS-Examples github repository.

Leave a Reply

Your email address will not be published. Required fields are marked *