<?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: ODS TableEditor multiple sheet in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-TableEditor-multiple-sheet/m-p/439003#M20451</link>
    <description>&lt;P&gt;gina,&lt;/P&gt;&lt;P&gt;I'm not trying to import any files. I have done my analysis in SAS and export it as an excel file. now, I'm trying to make my file look better. I have 8 different sheets in the excel file, I'm trying to make a table with the data and have 2 sheets instead of 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I can't use the data step process because the titles are different in each data set.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Feb 2018 18:18:13 GMT</pubDate>
    <dc:creator>parmis</dc:creator>
    <dc:date>2018-02-21T18:18:13Z</dc:date>
    <item>
      <title>ODS TableEditor multiple sheet</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-TableEditor-multiple-sheet/m-p/438990#M20447</link>
      <description>&lt;P&gt;hi guys,&lt;/P&gt;
&lt;P&gt;I'm automating a report with SAS. the final result is an excel file with 8 tabs. In each tab there are 3 fields and only one row.&lt;/P&gt;
&lt;P&gt;ex: sheet: paper&lt;/P&gt;
&lt;P&gt;fields:total payments, count, percentage&lt;/P&gt;
&lt;P&gt;I'm trying to use ODS to combine all 8 sheets into 2 sheets.&lt;/P&gt;
&lt;P&gt;how can I get data from multiple sheets with ODS?&lt;/P&gt;
&lt;P&gt;the code I'm trying to execute is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.tableeditor file="c:\temp\temp.js"
	options(update_target="c:\\temp\\temp.xlsx" output_type="script"
	sheet_name="payment"
	pivotdata_caption="payments,counts,percentage"
	pivotdata="payments,counts,percentage" pivotrow="title");

data _null_;
	file print;
	put _all_;
run;

ods tagsets.tableeditor close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;the results would be something like:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;payments&amp;nbsp; counts&amp;nbsp;&amp;nbsp;&amp;nbsp; percentage&lt;/P&gt;
&lt;P&gt;paper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numbers numbers&lt;/P&gt;
&lt;P&gt;epay&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;numbers numbers&lt;/P&gt;
&lt;P&gt;total&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 17:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-TableEditor-multiple-sheet/m-p/438990#M20447</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-02-21T17:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: ODS TableEditor multiple sheet</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-TableEditor-multiple-sheet/m-p/438996#M20450</link>
      <description>&lt;P&gt;I get the feeling you may be confusing SAS ODS with SAP ODS. In SAP, this stands for Operational Data Store.&amp;nbsp;But in SAS, this is the Output Delivery&amp;nbsp;System. As far as I know (though I don't use ODS very often), output is it's primary intended use, maybe even the only use. Not input. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What pops into my head for input is that SAS can treat Excel Workbooks as a library. If you use a LIBNAME statement such as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME myExcel XLSX path="D:\text.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From here, it's particularly easy to read all the data and turn it into whatever you'd like because every sheet from the original data is now accessed just like a data set in a library. To extend your example, if you have paper and maybe an electronic worksheet and you just wanted all the data concatenated, you could use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA work.combined;
     SET myExcel.paper myExcel.electronic;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are header rows or you need to do some manipulation with the numbers it will take a bit of extra finagling, but once you've got the data you like, then you can start using ODS to send it back to Excel, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 17:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-TableEditor-multiple-sheet/m-p/438996#M20450</guid>
      <dc:creator>GinaRepole</dc:creator>
      <dc:date>2018-02-21T17:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: ODS TableEditor multiple sheet</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-TableEditor-multiple-sheet/m-p/439003#M20451</link>
      <description>&lt;P&gt;gina,&lt;/P&gt;&lt;P&gt;I'm not trying to import any files. I have done my analysis in SAS and export it as an excel file. now, I'm trying to make my file look better. I have 8 different sheets in the excel file, I'm trying to make a table with the data and have 2 sheets instead of 8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I can't use the data step process because the titles are different in each data set.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 18:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-TableEditor-multiple-sheet/m-p/439003#M20451</guid>
      <dc:creator>parmis</dc:creator>
      <dc:date>2018-02-21T18:18:13Z</dc:date>
    </item>
  </channel>
</rss>

