<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Changing currency format when output to Excel from Stored Process in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Changing-currency-format-when-output-to-Excel-from-Stored/m-p/1964#M1604</link>
    <description>Are you using PROC PRINT, PROC REPORT or PROC TABULATE for setting your traffic lighting?? User-defined format?? or CALL DEFINE??&lt;BR /&gt;
&lt;BR /&gt;
The reason I ask is that, when I run this code in SAS (not as a stored process, just as a regular step), I get a red background color and black font in Excel.&lt;BR /&gt;
&lt;BR /&gt;
You may want to contact Tech Support and have them look over your entire program and suggest how you can change your code to achieve what you want. It seems odd to me that your traffic lighting would make both the foreground and background color red.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
My foreground color is black when I submit this code:[pre]&lt;BR /&gt;
        &lt;BR /&gt;
data class;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  if age gt 14 then age = age * -1;&lt;BR /&gt;
run;&lt;BR /&gt;
               &lt;BR /&gt;
proc format;&lt;BR /&gt;
  value agebk 1-high = 'white'&lt;BR /&gt;
        low-0 = 'red';&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
ods msoffice2k file='trafic.xls' style=sasweb;&lt;BR /&gt;
proc report data=class nowd;&lt;BR /&gt;
  column name age height;&lt;BR /&gt;
  define name /order;&lt;BR /&gt;
  define age /display style(column)={background=agebk.};&lt;BR /&gt;
  define height /display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;[/pre]</description>
    <pubDate>Fri, 15 Dec 2006 21:52:56 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2006-12-15T21:52:56Z</dc:date>
    <item>
      <title>Changing currency format when output to Excel from Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Changing-currency-format-when-output-to-Excel-from-Stored/m-p/1963#M1603</link>
      <description>I am using the following to output the results of a stored process to Excel.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
 rc = stpsrv_header('Content-type','application/vnd.ms-excel;');&lt;BR /&gt;
 rc = stpsrv_header('Content-disposition',"attachment; filename=name.xls");&lt;BR /&gt;
run;&lt;BR /&gt;
%let _odsdest=tagsets.msoffice2k;&lt;BR /&gt;
%let _odsstyle=sasweb;&lt;BR /&gt;
&lt;BR /&gt;
My problem is that the output create a Traffic light report, but if a negative $ value is returned, the font is red.  However, the background for that cell will also be red because of the traffic light rules.  I need to be able to reset the format in Excel to make sure that the font color is black.&lt;BR /&gt;
&lt;BR /&gt;
What do I need to do to send the desired font color to Excel?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any clues.&lt;BR /&gt;
KeithS</description>
      <pubDate>Fri, 15 Dec 2006 19:24:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Changing-currency-format-when-output-to-Excel-from-Stored/m-p/1963#M1603</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-12-15T19:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Changing currency format when output to Excel from Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Changing-currency-format-when-output-to-Excel-from-Stored/m-p/1964#M1604</link>
      <description>Are you using PROC PRINT, PROC REPORT or PROC TABULATE for setting your traffic lighting?? User-defined format?? or CALL DEFINE??&lt;BR /&gt;
&lt;BR /&gt;
The reason I ask is that, when I run this code in SAS (not as a stored process, just as a regular step), I get a red background color and black font in Excel.&lt;BR /&gt;
&lt;BR /&gt;
You may want to contact Tech Support and have them look over your entire program and suggest how you can change your code to achieve what you want. It seems odd to me that your traffic lighting would make both the foreground and background color red.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia&lt;BR /&gt;
&lt;BR /&gt;
My foreground color is black when I submit this code:[pre]&lt;BR /&gt;
        &lt;BR /&gt;
data class;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  if age gt 14 then age = age * -1;&lt;BR /&gt;
run;&lt;BR /&gt;
               &lt;BR /&gt;
proc format;&lt;BR /&gt;
  value agebk 1-high = 'white'&lt;BR /&gt;
        low-0 = 'red';&lt;BR /&gt;
run;&lt;BR /&gt;
                      &lt;BR /&gt;
ods msoffice2k file='trafic.xls' style=sasweb;&lt;BR /&gt;
proc report data=class nowd;&lt;BR /&gt;
  column name age height;&lt;BR /&gt;
  define name /order;&lt;BR /&gt;
  define age /display style(column)={background=agebk.};&lt;BR /&gt;
  define height /display;&lt;BR /&gt;
run;&lt;BR /&gt;
ods _all_ close;[/pre]</description>
      <pubDate>Fri, 15 Dec 2006 21:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Changing-currency-format-when-output-to-Excel-from-Stored/m-p/1964#M1604</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2006-12-15T21:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Changing currency format when output to Excel from Stored Process</title>
      <link>https://communities.sas.com/t5/Developers/Changing-currency-format-when-output-to-Excel-from-Stored/m-p/1965#M1605</link>
      <description>Thank you for the response. &lt;BR /&gt;
&lt;BR /&gt;
My code is producing HTML with a DATA _NULL_.  The background in the  is set based on values in the data.  The Stored Process is run via the Information Delivery Portal.  &lt;BR /&gt;
&lt;BR /&gt;
Once again, thanks for the response and I will check with SAS support.&lt;BR /&gt;
&lt;BR /&gt;
KeithS</description>
      <pubDate>Mon, 18 Dec 2006 14:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Changing-currency-format-when-output-to-Excel-from-Stored/m-p/1965#M1605</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-12-18T14:01:34Z</dc:date>
    </item>
  </channel>
</rss>

