Don't Gamble with Your Output: How to Use Microsoft Formats with ODS

Are you frustrated when Excel does not use your SAS ® formats for number cells? Do you lose leading zeros on ZIP codes or ID numbers? Does your character variable turn into a number in Excel? Don‘t gamble with your output! Learn how to use the HTMLSTYLE and TAGATTR style attributes to send Microsoft formats from SAS to Excel. This paper provides an overview of how you can use the HTMLSTYLE attribute with HTML-based destinations and the TAGATTR attribute with the TAGSETS.EXCELXP destination to send Microsoft formats from SAS to Excel using the Output Delivery System (ODS) STYLE= overrides. Learn how to figure out what Microsoft format to use and how to apply the format appropriately with ODS. A job aid is included in the paper; it lists some of the most common Microsoft formats used for numeric data. The examples in this paper demonstrate PROC PRINT, PROC REPORT, and PROC TABULATE coding techniques. Other job aids are provided that list some of the most common style attributes used in STYLE= overrides and show how to investigate Microsoft formats.