LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 30 Sep 2009 14:39:54 -0400
Reply-To:     Stephen Dybas <skd02@HEALTH.STATE.NY.US>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Stephen Dybas <skd02@HEALTH.STATE.NY.US>
Subject:      Need help setting cell background color using ODS tagsets.ExcelXP

Hello SAS-L subscribers,

I am looking for help with a traffic lighting issue that I can't seem to resolve.

I am using a style attribute that is incorrect for the XML file I am trying to create. What I want to do is change the background color of a cell, using a format, when the value in the cell is within certain ranges.

Proc format; value traffic low-<100='Green' 100-<250='Yellow' 250-high='Black'; run;

The variable I am focusing my attention is HIGH_COST.

ods tagsets.ExcelXP path="c:\temp" file="dmatchtest.xml";

PROC PRINT data=dmatch.sort_analysis; TITLE2"Sorted by COST1 - COST4";

VAR Recip_Name___First VS_Recip_Name___First Recip_Name___Last VS_Recip_Name___Last Recip_SSN VS_Recip_SSN Recip_DOB VS_Recip_DOB COST_First COST_Last COST_SSN COST_DOB;

VAR HIGH_COST / style(column)={background=traffic.};


ods tagsets.excelxp close;

The XML file is created, however, it will not open in Excel 2003 because of the incorrect style element.

A log file shows:

XML ERROR in Style REASON: Bad Value File: C:\temp\dmatch.xml GROUP: Style TAG: Interior ATTRIB: Color Value: 'Black'

An entry exists for 'Yellow' and 'Black' as well.

I am looking for any help in learning the correct way to assign the background color to a cell using tagsets.ExceXP and Proc Format.



Back to: Top of message | Previous page | Main SAS-L page