<?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: Why only % after ods excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/304860#M17166</link>
    <description>&lt;P&gt;You need to supply test data against which the code can be run to illustrate your problem.&lt;/P&gt;
&lt;P&gt;Do so in a data step with datalines.&lt;/P&gt;</description>
    <pubDate>Sat, 15 Oct 2016 09:48:45 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-10-15T09:48:45Z</dc:date>
    <item>
      <title>Why only % after ods excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/304859#M17165</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am coding to report into an excel as below, where I want all three columns dayA dayB dayC in percent8.2 format, such as 89.28%, but why for some data, &amp;nbsp;I could only get %, but without 89.28; for some, I only get 90%, which has rounded to percent 8.0 automatically. Please help, thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Proc report data=sum contents=" " nowd split='\'&lt;BR /&gt;style(header)={color=black just=center background=lightgrey fontweight=bold }&lt;BR /&gt;style(column)={color=black just=center background=lightcyan foreground=black };&lt;BR /&gt;title1 j=c color=black HEIGHT=14pt BOLD "band31+";&lt;BR /&gt;column strat_band &amp;nbsp; dayA &amp;nbsp; &amp;nbsp;dayB&amp;nbsp;dayC;&lt;/P&gt;&lt;P&gt;define strat_band/ "Band" style=[fontstyle=Roman fontweight=bold width=2in font_size=2.2 cellwidth=2in just=center foreground=black];&lt;BR /&gt;define dayA/ "31+Day &amp;nbsp;" ;&lt;BR /&gt;define dayB/ "31+A" ;&lt;BR /&gt;define dayC/ "31+B" ;&lt;/P&gt;&lt;P&gt;%macro comp(arg);&lt;BR /&gt;compute &amp;amp;arg;&lt;BR /&gt;if strat_band= '190-194' then call define(_col_,'format','percent8.2');&lt;BR /&gt;if strat_band= '225-229' then call define(_col_,'format','percent8.2');&lt;/P&gt;&lt;P&gt;if strat_band= '225-229' then call define(_col_,'format','percent8.2');&lt;BR /&gt;if strat_band= '230-234' then call define(_col_,'format','percent8.2');&lt;BR /&gt;if strat_band= '235-239' then call define(_col_,'format','percent8.2');&lt;BR /&gt;if strat_band= '240-244' then call define(_col_,'format','percent8.2');&lt;BR /&gt;if strat_band= '245-249' then call define(_col_,'format','percent8.2');&lt;BR /&gt;&lt;BR /&gt;endcomp;&lt;BR /&gt;%mend common_lines;&lt;BR /&gt;&lt;BR /&gt;%comp(dayA );&lt;BR /&gt;%comp( dayB );&lt;BR /&gt;%comp( dayC);&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 09:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/304859#M17165</guid>
      <dc:creator>zhangda</dc:creator>
      <dc:date>2016-10-15T09:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why only % after ods excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/304860#M17166</link>
      <description>&lt;P&gt;You need to supply test data against which the code can be run to illustrate your problem.&lt;/P&gt;
&lt;P&gt;Do so in a data step with datalines.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 09:48:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/304860#M17166</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-15T09:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why only % after ods excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/304861#M17167</link>
      <description>&lt;P&gt;Try percent12.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And check if Excel is helpfully adjusting your formats. Compare the value that appears to the value in the formula bar. &amp;nbsp;If it is, you'll need to use a tagattr format statement instead of SAS format.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this thread for examples, he ended up using both tagattr and increasing the width to 12.2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Outputting-Percent-format-in-ODS-EXCEL/td-p/199540/highlight/true/page/2" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Outputting-Percent-format-in-ODS-EXCEL/td-p/199540/highlight/true/page/2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 09:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/304861#M17167</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-15T09:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why only % after ods excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/305115#M17168</link>
      <description>&lt;P&gt;You may also want to look at the values of STRAT_BAND.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If strat_band has any&amp;nbsp; other value then those you show in the comparison then there is no call define and you'll get a default format.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 15:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-only-after-ods-excel/m-p/305115#M17168</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-17T15:18:13Z</dc:date>
    </item>
  </channel>
</rss>

