<?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 generate a complicated table without copying and pasting in excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345126#M79363</link>
    <description>Hi: I'm not sure what you posted. It has an OBS column -- so is this your desired report? What code have you tried? You said that "usually I would use SAS to generate output and copy and paste in excel"  -- so that means you have some kind of SAS code that you are starting with. Can you post that code and a sample of your data or use one of the SASHELP datasets to illustrate your question.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
    <pubDate>Tue, 28 Mar 2017 19:13:54 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2017-03-28T19:13:54Z</dc:date>
    <item>
      <title>how to generate a complicated table without copying and pasting in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345123#M79362</link>
      <description>&lt;P&gt;I need to generate a complicated table regarding race, age group, education and their scores. I need to do analysis first. So usually I would use&amp;nbsp;sas to generate output and copy and paste in excel, and then present in a&amp;nbsp;powerpoint or excel or word document.&lt;/P&gt;
&lt;P&gt;I know someone can directly use SAS to do that, I would like to get advice from you if you can do that&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you need a sample data set, I have attached one. So previoulsy I need to generate five tables and then do copy and paste into&amp;nbsp;one single table. If anyone can help to genearte the big table using SAS, please share.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 19:06:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345123#M79362</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2017-03-28T19:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a complicated table without copying and pasting in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345126#M79363</link>
      <description>Hi: I'm not sure what you posted. It has an OBS column -- so is this your desired report? What code have you tried? You said that "usually I would use SAS to generate output and copy and paste in excel"  -- so that means you have some kind of SAS code that you are starting with. Can you post that code and a sample of your data or use one of the SASHELP datasets to illustrate your question.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 28 Mar 2017 19:13:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345126#M79363</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-03-28T19:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a complicated table without copying and pasting in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345130#M79365</link>
      <description>&lt;P&gt;Search LexJansen.com for sample code for either 'demographic' table or clinical reports. Your output looks similar though its hard to tell what you're actually trying to do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS is capable of creating very complex reports, but its not necessarily easy to do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like just a big count table, so I have some code here that shows how to generate this in one table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/b308ac2cfc9b4db0ee3d793567627af0" target="_blank"&gt;https://gist.github.com/statgeek/b308ac2cfc9b4db0ee3d793567627af0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a worked example at the end that shows how to use the macro.&amp;nbsp;&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;</description>
      <pubDate>Tue, 28 Mar 2017 19:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345130#M79365</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-28T19:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a complicated table without copying and pasting in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345162#M79377</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; If I want to calculate&amp;nbsp;realtive risk and 95%Ci instead of chisq,&amp;nbsp;how and where I should replace, using your code as a template?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;table &amp;amp;varcross/chisq out=temp1;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;ods output OneWayChiSq=chisq;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;data temp2;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;set chisq (where=(Statistic="Chi-Square") keep=prob statistic rename=(prob=chisq));&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 28 Mar 2017 20:32:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345162#M79377</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2017-03-28T20:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a complicated table without copying and pasting in excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345165#M79379</link>
      <description>&lt;P&gt;Yes, you can change the ODS output to capture the data required and to report that instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're making changes, I suggest making one change, check if it works and then go forward step by step to change it to what you need.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 20:36:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-a-complicated-table-without-copying-and-pasting/m-p/345165#M79379</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-28T20:36:18Z</dc:date>
    </item>
  </channel>
</rss>

