<?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: Proc Report to ODS EXCEL (xml) : issue in writing last 0 after the decimal point in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859924#M339713</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219687"&gt;@IyenJ&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Actually it was ODS tagsets.excelxp destination. And column(style) with tagattr=format works perfectly there. Thank you so much!&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 14:46:26 GMT</pubDate>
    <dc:creator>A_Kh</dc:creator>
    <dc:date>2023-02-21T14:46:26Z</dc:date>
    <item>
      <title>Proc Report to ODS EXCEL (xml) : issue in writing last 0 after the decimal point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859800#M339670</link>
      <description>&lt;P&gt;Dear Community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While writing proc report output to Excel(xml) sheet, values ending in 0 after the decimal point gets rounded up. Eg. &lt;STRONG&gt;0.19&lt;/STRONG&gt;&amp;nbsp;written as &lt;STRONG&gt;0.19&lt;/STRONG&gt;, but &lt;STRONG&gt;0.20&lt;/STRONG&gt; gets rounded to &lt;STRONG&gt;0.2&amp;nbsp;&lt;/STRONG&gt;(I need it as &lt;STRONG&gt;0.20&lt;/STRONG&gt;)&lt;BR /&gt;I used format=4.2 in define statement, as well as in the prior data steps. Tried a different ways. But couldn't get the desired result (in html output it is produced though).&lt;/P&gt;
&lt;P&gt;Wondering if there is any ODS excel options to write the values from proc report as is.&amp;nbsp;&lt;BR /&gt;I've checked a similar post at communities -&amp;nbsp;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-to-Excel-numbers-get-rounded-up/td-p/580562" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report-to-Excel-numbers-get-rounded-up/td-p/580562&lt;/A&gt;&amp;nbsp;, where&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;answered the question. However, this answer is not resolving my issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any tips and advice would be much appreciated!&lt;/P&gt;
&lt;P&gt;Thanks and regards!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 00:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859800#M339670</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2023-02-21T00:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report to ODS EXCEL (xml) : issue in writing last 0 after the decimal point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859804#M339672</link>
      <description>&lt;P&gt;I'm not sure about the ODS EXCEL options. But, here's some additional tips about the ODS ExcelXP tagset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, you need to specify the style= option as a column style attribute. Additionally, make sure you specify the correct numeric format in the TAGATTR clause of the style= option.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, a 4.2 numeric format would translate into&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Define SUM / Style(column)={TAGATTR='format:0.00'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternately, a 6.2 numeric format would translate into&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Define SUM / Style(column)={TAGATTR='format:000.00'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 01:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859804#M339672</guid>
      <dc:creator>IyenJ</dc:creator>
      <dc:date>2023-02-21T01:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report to ODS EXCEL (xml) : issue in writing last 0 after the decimal point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859914#M339707</link>
      <description>&lt;P&gt;I think you just need a format with two digits after the decimal. If you are not getting the desired output, you should provide us with your exact code, and also provide a portion of your data as working SAS data step code (and not in any other format).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    y=0.19; output;
    y=0.2; output;
run;

ods excel file="text.xlsx";
proc report data=have;
    columns y;
    define y/display format=7.2;
run;
ods excel close;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 13:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859914#M339707</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-21T13:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report to ODS EXCEL (xml) : issue in writing last 0 after the decimal point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859924#M339713</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/219687"&gt;@IyenJ&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Actually it was ODS tagsets.excelxp destination. And column(style) with tagattr=format works perfectly there. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 14:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859924#M339713</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2023-02-21T14:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report to ODS EXCEL (xml) : issue in writing last 0 after the decimal point</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859927#M339716</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your input! I should have specified that was tagsets.excelxp destination, not excel itself. Unsure about how much different are options for those two destinations, I applied format 4.2 to the column in define statement(define Mean/ "Mean" center width=8 format=4.2 display;) , which rounded up the last decimal in xml file..&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.excelxp options (sheet_name= "Table 7." start_at= "B3" embedded_titles = "on" embedded_footnotes = "on" Merge_Titles_Footnotes = "on" Row_Heights='0,0,0,32,32,0,0' Skip_Space= '0,0,0,0,1');
	proc report data= items_final style(report)={background=white borderbottomcolor=black borderbottomwidth=1}
								 style(header)={background=white borderrightcolor=white borderleftcolor=white bordertopcolor=black borderbottomcolor=black bordertopwidth=1 borderbottomwidth=1};
		column ITEM LABEL N MEAN SD cat0 cat1 cat2 cat3 cat4 cat5 Missing;
		define ITEM/ "Item ID" left width=10 display;
		define LABEL/ "Item Content" left width=30 display;
		define n/ "Valid n" center width=8 display;
		define Mean/ "Mean" center width=8 Style(column)={TAGATTR='format:0.00'} display;
		define SD/ "SD" center width=8 Style(column)={TAGATTR='format:0.00'} display;
		define cat0/ "0" center width=11 display;
		define cat1/ "1" center width=11 display;
		define cat2/ "2" center width=11 display;
		define cat3/ "3" center width=11 display;
		define cat4/ "4" center width=11 display;
		define cat5/ "5" center width=11 display;
		define Missing/ "Missing" center width=11 display;
	run; 
	title;footnote;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2023 14:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-to-ODS-EXCEL-xml-issue-in-writing-last-0-after-the/m-p/859927#M339716</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2023-02-21T14:57:17Z</dc:date>
    </item>
  </channel>
</rss>

