<?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: where to find format attribute in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5338#M2156</link>
    <description>Hi:&lt;BR /&gt;
  That is truly the most complicated Microsoft format I have ever seen! My guess (and it's only a guess) is that it would be everything within the double quotes would move into the tagattr specification.&lt;BR /&gt;
[pre]&lt;BR /&gt;
"_-[$$-409]* #,##0_ ;_-[$$-409]* \-#,##0\ ;_-[$$-409]* "-"_ ;_-@_ "&lt;BR /&gt;
                &lt;BR /&gt;
either:&lt;BR /&gt;
tagattr="_-[$$-409]* #,##0_ ;_-[$$-409]* \-#,##0\ ;_-[$$-409]* "-"_ ;_-@_ "&lt;BR /&gt;
(without any other specification, the string is assumed to be a format)               &lt;BR /&gt;
or explicitly using Format:&lt;BR /&gt;
                                         &lt;BR /&gt;
tagattr="Format:_-[$$-409]* #,##0_ ;_-[$$-409]* \-#,##0\ ;_-[$$-409]* "-"_ ;_-@_ "&lt;BR /&gt;
[/pre] &lt;BR /&gt;
          &lt;BR /&gt;
  My Microsoft format explorations have not led me to anything this complicated. You may wish to work with Tech Support on this questions.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia</description>
    <pubDate>Thu, 23 Apr 2009 14:45:52 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2009-04-23T14:45:52Z</dc:date>
    <item>
      <title>where to find format attribute</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5335#M2153</link>
      <description>Hi&lt;BR /&gt;
To format the data  in ODS  ExcelXP, we use tagattr for example &lt;BR /&gt;
style = {tagattr='format : currency'}&lt;BR /&gt;
&lt;BR /&gt;
My question is  where can I go and  find the other tagattr values to format the data and it's description. I found some of them like the one I wriiten as an example. I want to know the all available format attribute inorder to format data  with leading zeros , comma etc... &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Inp</description>
      <pubDate>Thu, 01 Nov 2007 18:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5335#M2153</guid>
      <dc:creator>Inp</dc:creator>
      <dc:date>2007-11-01T18:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: where to find format attribute</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5336#M2154</link>
      <description>Hi:&lt;BR /&gt;
  These are Microsoft formats. So you'd find them in the Microsoft documentation. One way I find them is to reverse engineer them -- either make a small spreadsheet and then format the number the way I want and then save the file as either HTML or XML and then open the file with Notepad. Or, I use this paper as a reference (see the table of frequently used formats on Page 7).&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi28/052-28.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi28/052-28.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 01 Nov 2007 19:34:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5336#M2154</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-11-01T19:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: where to find format attribute</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5337#M2155</link>
      <description>Cynthia&lt;BR /&gt;
&lt;BR /&gt;
I have reverse engineered as you said and got this as my format:&lt;BR /&gt;
&lt;I&gt;&lt;NUMBERFORMAT format="_-[$$-409]* #,##0_ ;_-[$$-409]* \-#,##0\ ;_-[$$-409]* &amp;quot;-&amp;quot;_ ;_-@_ "&gt;&lt;/NUMBERFORMAT&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
What part of this should I extract and put into my tagattr?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Drew</description>
      <pubDate>Thu, 23 Apr 2009 14:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5337#M2155</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-23T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: where to find format attribute</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5338#M2156</link>
      <description>Hi:&lt;BR /&gt;
  That is truly the most complicated Microsoft format I have ever seen! My guess (and it's only a guess) is that it would be everything within the double quotes would move into the tagattr specification.&lt;BR /&gt;
[pre]&lt;BR /&gt;
"_-[$$-409]* #,##0_ ;_-[$$-409]* \-#,##0\ ;_-[$$-409]* "-"_ ;_-@_ "&lt;BR /&gt;
                &lt;BR /&gt;
either:&lt;BR /&gt;
tagattr="_-[$$-409]* #,##0_ ;_-[$$-409]* \-#,##0\ ;_-[$$-409]* "-"_ ;_-@_ "&lt;BR /&gt;
(without any other specification, the string is assumed to be a format)               &lt;BR /&gt;
or explicitly using Format:&lt;BR /&gt;
                                         &lt;BR /&gt;
tagattr="Format:_-[$$-409]* #,##0_ ;_-[$$-409]* \-#,##0\ ;_-[$$-409]* "-"_ ;_-@_ "&lt;BR /&gt;
[/pre] &lt;BR /&gt;
          &lt;BR /&gt;
  My Microsoft format explorations have not led me to anything this complicated. You may wish to work with Tech Support on this questions.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 23 Apr 2009 14:45:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5338#M2156</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-04-23T14:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: where to find format attribute</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5339#M2157</link>
      <description>Thanks Cynthia&lt;BR /&gt;
&lt;BR /&gt;
I also thought that this was a little complex - I am simply trying to put the '$' and '€' formats onto my data - my 'currnecy' format is the '£' and I need to use a macro to repeat the report in all 3 currencies. Putting the string into a macro variable causes all kinds of problems because of things like the '#' character.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
Drew</description>
      <pubDate>Thu, 23 Apr 2009 15:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5339#M2157</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-23T15:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: where to find format attribute</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5340#M2158</link>
      <description>Hi:&lt;BR /&gt;
  I guess my thought would be to avoid a macro VARIABLE for the string and instead use macro conditional logic to build the whole procedure statement. This would mean having a macro program. Or you could work with Tech Support to see how macro quoting functions might be used effectively in this situation. I also thought there were some good suggestions here: &lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/message.jspa?messageID=20119#20119" target="_blank"&gt;http://support.sas.com/forums/message.jspa?messageID=20119#20119&lt;/A&gt; &lt;BR /&gt;
 &lt;BR /&gt;
  You could also try to simplify the format and see whether there is a simpler version of the format that would work for you. I don't really use Excel formats enough to understand how the format is being constructed from this string.&lt;BR /&gt;
&lt;BR /&gt;
  An simple example of conditionally specifying a whole procedure statement is shown below using ODS HTML, which is roughly the equivalent of what you want to do.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
%macro dostmt(sel=X);&lt;BR /&gt;
                             &lt;BR /&gt;
  proc print data=sashelp.class;&lt;BR /&gt;
     title "The selection value is: &amp;amp;sel";&lt;BR /&gt;
     %if %upcase(&amp;amp;sel) = P %then %do;&lt;BR /&gt;
     var name / style(header) = {background=purple};&lt;BR /&gt;
     %end;&lt;BR /&gt;
     %else %if %upcase(&amp;amp;sel) = D %then %do;&lt;BR /&gt;
     var name / style(header) = {background=pink};&lt;BR /&gt;
     %end;&lt;BR /&gt;
     %else %do;&lt;BR /&gt;
     var name / style(header) = {background=cxdddddd};&lt;BR /&gt;
     %end;&lt;BR /&gt;
     var age height;&lt;BR /&gt;
  run;&lt;BR /&gt;
%mend dostmt;&lt;BR /&gt;
                             &lt;BR /&gt;
ods html file='sel_p.html' style=sasweb;&lt;BR /&gt;
  %dostmt(sel=P);&lt;BR /&gt;
ods html close;&lt;BR /&gt;
                        &lt;BR /&gt;
ods html file='sel_d.html' style=sasweb;&lt;BR /&gt;
  %dostmt(sel=D);&lt;BR /&gt;
ods html close;&lt;BR /&gt;
                 &lt;BR /&gt;
ods html file='sel_o.html' style=sasweb;&lt;BR /&gt;
  %dostmt(sel=o);&lt;BR /&gt;
ods html close;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 23 Apr 2009 18:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5340#M2158</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-04-23T18:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: where to find format attribute</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5341#M2159</link>
      <description>Thanks Cynthia, you've been awesome as always!</description>
      <pubDate>Fri, 24 Apr 2009 07:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/where-to-find-format-attribute/m-p/5341#M2159</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-24T07:18:27Z</dc:date>
    </item>
  </channel>
</rss>

