<?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: ODS tagattr for credit value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/885932#M350083</link>
    <description>&lt;P&gt;unfortunately I was not able to get this to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jul 2023 11:22:24 GMT</pubDate>
    <dc:creator>Elliott</dc:creator>
    <dc:date>2023-07-22T11:22:24Z</dc:date>
    <item>
      <title>ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884674#M349508</link>
      <description>&lt;P&gt;I have a user asking to reformat a $ value when it is a credit it is showing as&amp;nbsp;$-1,175.55 user wants&amp;nbsp;($1,175.55)&lt;/P&gt;
&lt;P&gt;I am using :&lt;/P&gt;
&lt;P&gt;style(column)= [tagattr='format:$#,###,##0.00']; =&amp;nbsp;$-1,175.55&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The users want the value to look like ($1,175.55)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a tagattr style that will give me that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 15:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884674#M349508</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-07-13T15:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884680#M349512</link>
      <description>Is this for Excel? If so, you need the Excel format?&lt;BR /&gt;&lt;A href="https://www.ablebits.com/office-addins-blog/custom-excel-number-format/" target="_blank"&gt;https://www.ablebits.com/office-addins-blog/custom-excel-number-format/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Possibly: 'format:$#,###,##0.00;($#,###,##0.00)'</description>
      <pubDate>Thu, 13 Jul 2023 16:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884680#M349512</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-07-13T16:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884699#M349525</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, this did not work.&amp;nbsp; I am outputting to excel and we are processing on a linux server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the link, that was very helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there anything else to try?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884699#M349525</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-07-13T18:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884703#M349526</link>
      <description>&lt;P&gt;Processing what on Linux?&amp;nbsp; The EXCEL file?&amp;nbsp; or the SAS program that is writing the EXCEL file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Setting the format works for me:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;missing d;
data test;
  input id amount ;
cards;
1 1234.56
2 -1234.56
3 0
4 D
;

ods excel file='c:\downloads\credit.xlsx';
proc print data=test;
  id id;
  var amount / style(data)=[tagattr='format:$#,###,##0.00;($#,###,##0.00);"-";[Red]@'] ;
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1689274378568.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85766i2E4E102718EA0798/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1689274378568.png" alt="Tom_0-1689274378568.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 18:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884703#M349526</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-07-13T18:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884735#M349537</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;Processing on Linux creating an excel output.&lt;/P&gt;
&lt;P&gt;I tried your suggestion but it did not give the desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 23:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884735#M349537</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-07-13T23:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884740#M349542</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1689298826972.jpeg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85767i7A5927A9114B71D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1689298826972.jpeg" alt="Tom_0-1689298826972.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am not Johnny Carson.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please share an example of code that does not work.&lt;/P&gt;
&lt;P&gt;Explain what about it does not work.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 01:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884740#M349542</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-07-14T01:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884784#M349564</link>
      <description>&lt;DIV class="elementToProof ContentPasted0"&gt;Hi Tom,&lt;/DIV&gt;
&lt;DIV class="elementToProof ContentPasted0"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="elementToProof ContentPasted0"&gt;The problem is that the user wants the excel output to show the credit value as ($1,755.50) not $-1,755.50.&lt;/DIV&gt;
&lt;DIV class="elementToProof ContentPasted0"&gt;I am using --&amp;nbsp;&lt;SPAN class="ContentPasted1"&gt;Cur_Bal / style(Column)= [tagattr='format:$#,###,##0.00'];&amp;nbsp; -- for formatting, I have tried all suggestions and they have not given the result.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="elementToProof ContentPasted0"&gt;Here is my code:&lt;/DIV&gt;
&lt;DIV class="elementToProof ContentPasted0"&gt;ods tagsets.excelxp
&lt;DIV class="ContentPasted0"&gt;options(embedded_titles='yes' minimize_style='yes' wraptext='no' AUTOFIT_HEIGHT='yes' )&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;rs=none style=XLsansPrinter;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;ods noproctitle;&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;/*Sample tab*/&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;ods tagsets.excelxp options(sheet_name="Inventory_Mismatch" sheet_interval='none' embedded_titles='yes' wraptext = "no" autofilter='all'&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; absolute_column_width="15,15,15,15,20,25,15"); &amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;proc print data=BASE_1 label Noobs;&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;var&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;IDNumber /style(Column)= [tagattr='format:text' ];&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;var&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;Status_Dt&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;GroupCode;&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;var&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;Cur_Bal / style(Column)= [tagattr='format:$#,###,##0.00'];&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;var&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;Category&lt;/DIV&gt;
&lt;DIV class="ContentPasted0"&gt;;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
run;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Jul 2023 12:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884784#M349564</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-07-14T12:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884786#M349566</link>
      <description>I tried Tom's code on SAS OnDemand for Academics (=linux server) and got the desired result. The SAS Studio results window shows -1234.56. But the excel file is formatted correctly. I downloaded the excel file and opened it to verify.</description>
      <pubDate>Fri, 14 Jul 2023 12:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884786#M349566</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2023-07-14T12:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884803#M349575</link>
      <description>&lt;P&gt;You did not include the extra values in the Excel format so that it Excel would know you wanted the negative values formatted differently.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;var Cur_Bal
  / style(Column)= [tagattr='format:$#,###,##0.00;($#,###,##0.00)']
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you are not making a real Excel file.&amp;nbsp; You are making an XML file.&amp;nbsp; To write an actual XLSX file use ODS EXCEL instead of the EXCELXP tagset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 13:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/884803#M349575</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-07-14T13:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/885932#M350083</link>
      <description>&lt;P&gt;unfortunately I was not able to get this to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 11:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/885932#M350083</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-07-22T11:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/885953#M350091</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17300"&gt;@Elliott&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;unfortunately I was not able to get this to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Elliott&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;" to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "&amp;lt;/&amp;gt;" icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 17:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/885953#M350091</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-07-22T17:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagattr for credit value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/887008#M350493</link>
      <description>&lt;P&gt;Thank you, I have achieved the desired result.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2023 11:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-tagattr-for-credit-value/m-p/887008#M350493</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2023-07-30T11:15:48Z</dc:date>
    </item>
  </channel>
</rss>

