<?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: How to report in excel well in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304778#M60864</link>
    <description>&lt;P&gt;Your easiest solution may be to add a variable to group them by and use Sheet_Interval = 'Bygroup'. Which would put the output for separate values of the BY variable on separate sheets.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2016 19:39:03 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-10-14T19:39:03Z</dc:date>
    <item>
      <title>How to report in excel well</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304680#M60852</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&lt;SPAN&gt;Hello!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am coding to report in excel workbook attachment, which includes two sheet tabs, one is 2015 product, another is 2016 product. For first sheet tab, I have&amp;nbsp;2015 products, including&amp;nbsp;four product , A, B, C, D, but why the last product D showing in the first part of the second sheet tab, which is supposed to be 2016 product only. Would you please help me out? The code below is incomplete, just an example, because I am thinking there must be an option that could solve the issue, &amp;nbsp;the attachment is my result. Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ODS LISTING CLOSE;&lt;/P&gt;&lt;P&gt;ODS TAGSETS.EXCELXP file="/opt/sas/sasmain/Project.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;STYLE=minimal options( Autofit_height='yes'&lt;/P&gt;&lt;P&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; frozen_rowheaders='yes' sheet_interval='none' embedded_footnotes='yes'&lt;/P&gt;&lt;P&gt;sheet_label = ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;embedded_titles = 'yes'&lt;/P&gt;&lt;P&gt;&amp;nbsp;suppress_bylines = 'yes' sheet_name='2015 Product&lt;/P&gt;&lt;P&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; autofilter='all' autofilter_table='2'*/&lt;/P&gt;&lt;P&gt;Orientation = 'landscape' width_fudge='0.1'&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods tagsets.ExcelXP options(sheet_interval='none' sheet_name=2015 Product ');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt; &lt;STRONG&gt;report&lt;/STRONG&gt; data=allproduct_dqm contents="&amp;nbsp;&amp;nbsp; " nowd split='\'&lt;/P&gt;&lt;P&gt;/*style(report)={font_size=14pt cellpadding=4pt cellspacing=1 rules=none frame=void}*/&lt;/P&gt;&lt;P&gt;style(header)={color=white background=cornflowerblue&amp;nbsp; height=&lt;STRONG&gt;1.3&lt;/STRONG&gt;in fontsize=&lt;STRONG&gt;1.5&lt;/STRONG&gt; }&lt;/P&gt;&lt;P&gt;style(column)={just=center background=snow foreground=black cellwidth=&lt;STRONG&gt;1&lt;/STRONG&gt;in&amp;nbsp;&amp;nbsp; foreground=black&amp;nbsp; fontsize=&lt;STRONG&gt;1.5&lt;/STRONG&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;title1 j=c&amp;nbsp; color=black HEIGHT=&lt;STRONG&gt;10&lt;/STRONG&gt;pt&amp;nbsp; BOLD "Credit Metrics for All Products";&lt;/P&gt;&lt;P&gt;column _name_&amp;nbsp;&amp;nbsp; year2016&amp;nbsp; year2015&amp;nbsp;&amp;nbsp; Num_of_Variance mature2015&amp;nbsp; Num_of_Variance2 y2016 y2015 Variance ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;define _name_ / "Metrics"&amp;nbsp;&amp;nbsp; style=[foreground=negfmt.];&lt;/P&gt;&lt;P&gt;define year2016/&amp;nbsp; "&amp;amp;Apr_Yr."&amp;nbsp; style=[foreground=negfmt.];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;compute _name_ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _name_= 'Avg FICO'&amp;nbsp; then call define(_row_,'style','style={background=gainsboro}');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;%macro&lt;/STRONG&gt; comp(arg);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compute &amp;amp;arg;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&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; If _name_='2015 Product'&amp;nbsp;&amp;nbsp; then call define(_col_,'format','comma20.0');&lt;/P&gt;&lt;P&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;If _name_='CreditAR'&amp;nbsp;&amp;nbsp; then call&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;%mend&lt;/STRONG&gt; common_lines;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods tagsets.ExcelXP options(sheet_interval='none' sheet_name='2016 Product');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Proc&lt;/STRONG&gt; &lt;STRONG&gt;report&lt;/STRONG&gt; data=allproduct_orig&amp;nbsp;&amp;nbsp; contents="&amp;nbsp;&amp;nbsp; " nowd split='\'&lt;/P&gt;&lt;P&gt;style(header)={color=white just=center background=lightgrey fontweight=bold }&lt;/P&gt;&lt;P&gt;style(column)={color=white just=center background=lightcyan foreground=black };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column _name_&amp;nbsp;&amp;nbsp; month2016 month2015 Num_of_Variance Perc_of_Variance&amp;nbsp;&amp;nbsp; year2016 year2015&amp;nbsp; Perc_of_Variance_y;&lt;/P&gt;&lt;P&gt;title1 j=c&amp;nbsp; color=black HEIGHT=&lt;STRONG&gt;10&lt;/STRONG&gt;pt&amp;nbsp; BOLD " All Products";&lt;/P&gt;&lt;P&gt;define _name_ / "Originations"&amp;nbsp;&amp;nbsp; style=[fontstyle=Roman&amp;nbsp; fontweight=bold width=&lt;STRONG&gt;2&lt;/STRONG&gt;in font_size=&lt;STRONG&gt;2.2&lt;/STRONG&gt; cellwidth=&lt;STRONG&gt;2&lt;/STRONG&gt;in just=center foreground=negfmt.];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304680#M60852</guid>
      <dc:creator>zhangda</dc:creator>
      <dc:date>2016-10-14T14:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to report in excel well</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304682#M60853</link>
      <description>&lt;P&gt;Others might have input on your format and approach, but my first advice is this. &amp;nbsp;If you have SAS 9.4m3, use ODS EXCEL instead of ODS TAGSETS.EXCELXP. &amp;nbsp;The syntax is nearly identical, and you'll get a native&amp;nbsp;&lt;STRONG&gt;xlsx&lt;/STRONG&gt; file that's much smaller in size and more acceptable to Microsoft Excel.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304682#M60853</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-10-14T14:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to report in excel well</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304685#M60855</link>
      <description>&lt;P&gt;Sorry, its not going to be possible to work out any issue from that. &amp;nbsp;The code is mostly missing, and I wouldn't download any Excel files due to security risks. &amp;nbsp;Post some example test data - just a couple of lines, in a datastep, and the full export code so that we can run it. &amp;nbsp;If a variable is really appearing on another sheet then I imagine the code - with the macro part - is not resolving correctly - however I can't see your log so can't tell you. &amp;nbsp;If its just appearing on another page, you have too many variables for one page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One other tip, post code in code window - {i} or the SAS run symbol above the post area. &amp;nbsp;Remove commented blocks, use consistent indetation and capitilisation to make code as readbel as possible,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, looking at it further there are nnumerous errors/typos in that code, here I updated a bit for you. &amp;nbsp;There are no product A B C D variables given anywhere, are these observations if so then that is what is in that dataset:&lt;/P&gt;
&lt;PRE&gt;ods listing close;
ods tagsets.excelxp file="/opt/sas/sasmain/Project.xls"
  style=minimal options( Autofit_height='yes'
        frozen_rowheaders='yes' sheet_interval='none' embedded_footnotes='yes'
        sheet_label = ' '
        embedded_titles = 'yes'
        suppress_bylines = 'yes' sheet_name='2015 Product' Orientation = 'landscape' width_fudge='0.1');
ods tagsets.ExcelXP options(sheet_interval='none' sheet_name='2015 Product ');
 
Proc report data=allproduct_dqm contents="   " nowd split='\'
  style(header)={color=white background=cornflowerblue  height=1.3in fontsize=1.5 }
  style(column)={just=center background=snow foreground=black cellwidth=1in   foreground=black  fontsize=1.5};
  title1 j=c  color=black HEIGHT=10pt  BOLD "Credit Metrics for All Products";
  column _name_   year2016  year2015   Num_of_Variance mature2015  Num_of_Variance2 y2016 y2015 Variance ;  /* &amp;lt;- this shows the columns to output */&lt;/PRE&gt;
&lt;P&gt;Example of typo: &lt;SPAN&gt;ods tagsets.ExcelXP options(sheet_interval='none' sheet_name=2015 Product ');&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Missing quote before 2015.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:29:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304685#M60855</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-14T14:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to report in excel well</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304690#M60856</link>
      <description>&lt;P&gt;When you use&lt;/P&gt;
&lt;P&gt;(sheet_interval='none'&lt;/P&gt;
&lt;P&gt;it means just that, all the data goes to the same sheet until a different interval is specified in an ODS tagsets.excelxp statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want (sheet_interval='proc'&lt;/P&gt;
&lt;P&gt;to send all of the output to one sheet from a single Procedure call or if you have a procedure that generates multiple tables then 'table'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But since you have columns with names like&amp;nbsp;year2016&amp;nbsp; year2015&amp;nbsp;&amp;nbsp;&amp;nbsp;y2016 y2015 in a single proc report definition&amp;nbsp;it appears that you really do not want to separate the years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a variable to split the report on then use the BY statement in the proc and the table option for the sheet_interval. Maybe.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304690#M60856</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-14T14:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to report in excel well</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304753#M60863</link>
      <description>&lt;DIV class="lia-quilt-column lia-quilt-column-08 lia-quilt-column-left"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-16 lia-quilt-column-right"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;&lt;DIV class="lia-form-submit lia-button-group"&gt;But I have 12 tables generated by proc report procedures. I want to display table 1-6 in the sheettab1, and 7-12 in sheettab2, they are not divided by group, thanks!&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 14 Oct 2016 18:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304753#M60863</guid>
      <dc:creator>zhangda</dc:creator>
      <dc:date>2016-10-14T18:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to report in excel well</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304778#M60864</link>
      <description>&lt;P&gt;Your easiest solution may be to add a variable to group them by and use Sheet_Interval = 'Bygroup'. Which would put the output for separate values of the BY variable on separate sheets.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 19:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/304778#M60864</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-14T19:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to report in excel well</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/305011#M60878</link>
      <description>&lt;P&gt;Its simply a matter of putting your proc reports in the right place:&lt;/P&gt;
&lt;PRE&gt;ods tagsets.excelxp file=... options(sheet_name="First sheet" ...);
proc report data=table1...
proc report data=table2...
...

ods tagsets.excelxp options(sheet_name="Second sheet"...);
proc report data=table7...
...

ods tagsets.excelxp close;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Oct 2016 08:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-report-in-excel-well/m-p/305011#M60878</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-17T08:27:24Z</dc:date>
    </item>
  </channel>
</rss>

