<?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: Merging tables from multiple excel files in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631747#M20983</link>
    <description>I don't have access to the PC right now. I have tried building a few codes, but it didn't work for me. I think that I am making it way too complicated than it should be</description>
    <pubDate>Fri, 13 Mar 2020 00:19:55 GMT</pubDate>
    <dc:creator>Mil00</dc:creator>
    <dc:date>2020-03-13T00:19:55Z</dc:date>
    <item>
      <title>Merging tables from multiple excel files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631693#M20965</link>
      <description>&lt;P&gt;I have 4 excel files to merge into one output (proc print will be enough). Each file has a table with two variables: 'Student_no' and 'Mark'.&lt;/P&gt;&lt;P&gt;Student_no always stays the same, but marks for each file is different, e.g.&lt;/P&gt;&lt;P&gt;File 1:&lt;/P&gt;&lt;P&gt;Student_no&amp;nbsp; &amp;nbsp; &amp;nbsp; Mark1&lt;/P&gt;&lt;P&gt;d5476&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 87&lt;/P&gt;&lt;P&gt;d7389&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 46&lt;/P&gt;&lt;P&gt;d1276&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 58&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File2:&lt;/P&gt;&lt;P&gt;Student_no&amp;nbsp; &amp;nbsp; &amp;nbsp; Mark2&lt;/P&gt;&lt;P&gt;d5476&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&lt;/P&gt;&lt;P&gt;d7389&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 52&lt;/P&gt;&lt;P&gt;d1276&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 96&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create one table as an output which should look like this:&lt;/P&gt;&lt;P&gt;Student_no&amp;nbsp; &amp;nbsp; &amp;nbsp; Mark1&amp;nbsp; &amp;nbsp; &amp;nbsp;Mark2&amp;nbsp; &amp;nbsp; Mark3&amp;nbsp; &amp;nbsp; Mark4&lt;/P&gt;&lt;P&gt;d5476&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;74&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 45&lt;/P&gt;&lt;P&gt;d7389&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 52&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 56&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;89&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 57&lt;/P&gt;&lt;P&gt;d1276&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 96&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 67&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;57&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 93&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 20:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631693#M20965</guid>
      <dc:creator>Mil00</dc:creator>
      <dc:date>2020-03-12T20:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables from multiple excel files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631694#M20966</link>
      <description>&lt;P&gt;Show us what you have tried so far.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 20:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631694#M20966</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-12T20:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables from multiple excel files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631745#M20982</link>
      <description>Is there any way I can contact you through email? Don't want to spam here too much</description>
      <pubDate>Fri, 13 Mar 2020 00:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631745#M20982</guid>
      <dc:creator>Mil00</dc:creator>
      <dc:date>2020-03-13T00:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables from multiple excel files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631747#M20983</link>
      <description>I don't have access to the PC right now. I have tried building a few codes, but it didn't work for me. I think that I am making it way too complicated than it should be</description>
      <pubDate>Fri, 13 Mar 2020 00:19:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631747#M20983</guid>
      <dc:creator>Mil00</dc:creator>
      <dc:date>2020-03-13T00:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables from multiple excel files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631818#M20995</link>
      <description>&lt;P&gt;It's not spam to ask SAS questions here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not provide technical support via e-mail.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 11:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/631818#M20995</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-13T11:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables from multiple excel files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/632056#M21033</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;asks what you have attempted so far because it shows you have tried and sometimes we only need to add a detail or two as your solution may be very close.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if you have run code and are having issues related to warnings or errors then you should copy the log entry and paste the log text into a code box opened on the forum using the {I} or "running man" icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hint:&lt;/P&gt;
&lt;P&gt;Stare with the SAS data sets you have.&lt;/P&gt;
&lt;P&gt;Sort by the common key variable.&lt;/P&gt;
&lt;P&gt;Data step merge by that variable.&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;Warning: Because your data starts in Excel there may be added steps to RENAME variables needed.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 19:34:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/632056#M21033</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-13T19:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Merging tables from multiple excel files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/632311#M21060</link>
      <description>&lt;P&gt;Assuming you're able to read the Excel data into SAS tables here how to combine the data (the bit for the 4th table for you to add).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data tbl1;
  input Student_no $ Mark;
  datalines;
d5476 87
d7389 46
d1276 58
;

data tbl2;
  input Student_no $ Mark;
  datalines;
d5476 67
d7389 52
d1276 96
;

data tbl3;
  input Student_no $ Mark;
  datalines;
d5476 67
d9999 99
d1276 96
;

proc sort data=tbl1;
  by student_no;
run;
proc sort data=tbl2;
  by student_no;
run;
proc sort data=tbl3;
  by student_no;
run;

data want;
  merge 
    tbl1(rename=(mark=mark1))
    tbl2(rename=(mark=mark2))
    tbl3(rename=(mark=mark3))
    ;
  by student_no;
run;
proc print data=want;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 02:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Merging-tables-from-multiple-excel-files/m-p/632311#M21060</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-16T02:58:22Z</dc:date>
    </item>
  </channel>
</rss>

