<?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 Sub-totals in Excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52048#M6572</link>
    <description>I would like to create sub-totals in excel from my data set. In my original dataset my data is like this where col3 is a sum of col2 by col1 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
col1   col2 col3 &lt;BR /&gt;
AAA  1      4 &lt;BR /&gt;
AAA  1      4 &lt;BR /&gt;
AAA  2      4 &lt;BR /&gt;
BBB  1      5 &lt;BR /&gt;
BBB  3      5 &lt;BR /&gt;
BBB  1      5 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I would like this data to appear in my excel spreadsheet like this &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
AAA  1 &lt;BR /&gt;
AAA  1 &lt;BR /&gt;
AAA  2 &lt;BR /&gt;
     -- &lt;BR /&gt;
     4 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
BBB  1 &lt;BR /&gt;
BBB  3 &lt;BR /&gt;
BBB  1 &lt;BR /&gt;
     -- &lt;BR /&gt;
     5 &lt;BR /&gt;
&lt;BR /&gt;
..but I am not sure if I need to do something with source dataset first or &lt;BR /&gt;
in excel after it has been imported? &lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Lee

Message was edited by: Lee2010</description>
    <pubDate>Wed, 03 Feb 2010 21:32:08 GMT</pubDate>
    <dc:creator>LeeJenson</dc:creator>
    <dc:date>2010-02-03T21:32:08Z</dc:date>
    <item>
      <title>Sub-totals in Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52048#M6572</link>
      <description>I would like to create sub-totals in excel from my data set. In my original dataset my data is like this where col3 is a sum of col2 by col1 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
col1   col2 col3 &lt;BR /&gt;
AAA  1      4 &lt;BR /&gt;
AAA  1      4 &lt;BR /&gt;
AAA  2      4 &lt;BR /&gt;
BBB  1      5 &lt;BR /&gt;
BBB  3      5 &lt;BR /&gt;
BBB  1      5 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I would like this data to appear in my excel spreadsheet like this &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
AAA  1 &lt;BR /&gt;
AAA  1 &lt;BR /&gt;
AAA  2 &lt;BR /&gt;
     -- &lt;BR /&gt;
     4 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
BBB  1 &lt;BR /&gt;
BBB  3 &lt;BR /&gt;
BBB  1 &lt;BR /&gt;
     -- &lt;BR /&gt;
     5 &lt;BR /&gt;
&lt;BR /&gt;
..but I am not sure if I need to do something with source dataset first or &lt;BR /&gt;
in excel after it has been imported? &lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Lee

Message was edited by: Lee2010</description>
      <pubDate>Wed, 03 Feb 2010 21:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52048#M6572</guid>
      <dc:creator>LeeJenson</dc:creator>
      <dc:date>2010-02-03T21:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sub-totals in Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52049#M6573</link>
      <description>Hi:&lt;BR /&gt;
It sounds like you want a report in Excel. Have you tried PROC PRINT with the SUM statement??? &lt;BR /&gt;
&lt;BR /&gt;
Do you know which technique you're going to use to get your output into Excel??? You basically have 3 choices using ODS: &lt;BR /&gt;
1) creating a comma-separated file using ODS CSV or ODS CSVALL&lt;BR /&gt;
2) creating an HTML file using ODS HTML, ODS HTML3 or ODS MSOFFICE2K&lt;BR /&gt;
3) creating an XML file that follows the Microsoft Spreadsheet Markup Language XML specification for how to describe a workbook and worksheets using ODS TAGSETS.EXCELXP&lt;BR /&gt;
&lt;BR /&gt;
Some examples of using each of these 3 techniques is shown in an answer to your previous posting.&lt;BR /&gt;
 &lt;BR /&gt;
As to what procedure you use, I suggest you try a PROC PRINT something like this (code not tested because there's not enough information about your destination to generate working ODS code).&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
ods &lt;YOUR destination=""&gt; file='&lt;YOUR file="" info=""&gt;'&lt;BR /&gt;
                       style=sasweb;&lt;BR /&gt;
                 &lt;BR /&gt;
proc print data=lib.yourdata;&lt;BR /&gt;
  var col1 col2;&lt;BR /&gt;
  sum col2;&lt;BR /&gt;
run;&lt;BR /&gt;
            &lt;BR /&gt;
ods &lt;YOUR destination=""&gt; close;&lt;BR /&gt;
[/pre]&lt;/YOUR&gt;&lt;/YOUR&gt;&lt;/YOUR&gt;</description>
      <pubDate>Wed, 03 Feb 2010 21:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52049#M6573</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-02-03T21:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sub-totals in Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52050#M6574</link>
      <description>Hello Cynthia, &lt;BR /&gt;
&lt;BR /&gt;
Thanks for your reply. The only method I am using to export my dataset to Excel is a PROC EXPORT. I think this is where I am going wrong  as I am not using any ODS type commands.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Lee</description>
      <pubDate>Thu, 04 Feb 2010 09:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52050#M6574</guid>
      <dc:creator>LeeJenson</dc:creator>
      <dc:date>2010-02-04T09:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sub-totals in Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52051#M6575</link>
      <description>Consider the opportunity to have a separate XLS document containing only a pivot-table report (your summary information), and the XLS documents opens and imports an external CSV file.  You can then keep your SAS-exported data separate from the Excel document that does the summarization and report generation, if that is your reference.  For your SAS execution, you would want to explore using PROC EXPORT directly to a CSV-format (or XLS directly).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 04 Feb 2010 10:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52051#M6575</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-02-04T10:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sub-totals in Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52052#M6576</link>
      <description>Thank you Scott&lt;BR /&gt;
Lee</description>
      <pubDate>Thu, 04 Feb 2010 17:21:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Sub-totals-in-Excel/m-p/52052#M6576</guid>
      <dc:creator>LeeJenson</dc:creator>
      <dc:date>2010-02-04T17:21:38Z</dc:date>
    </item>
  </channel>
</rss>

