|
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.};
RUN;
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.
Thanks,
Steve
|