<?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: Read excel files with non-standard format and restructure in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232128#M5706</link>
    <description>&lt;P&gt;It sounds like you got the help you needed,&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/56622" target="_self"&gt;BellaLuna&lt;/A&gt;, that's great! Can you mark which answer worked by clicking "Accept as solution"?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Thanks and look forward to "seeing" more of you here on the community!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Anna&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2015 20:58:52 GMT</pubDate>
    <dc:creator>AnnaBrown</dc:creator>
    <dc:date>2015-10-28T20:58:52Z</dc:date>
    <item>
      <title>Read excel files with non-standard format and restructure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232047#M5692</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Greetings!&lt;/P&gt;
&lt;P&gt;My problem is, I have hundreds of excel files that look like this:&amp;nbsp;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/670iF4D55D4B181F8A0C/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Screen Shot 2015-10-28 at 11.26.14 AM.png" title="Screen Shot 2015-10-28 at 11.26.14 AM.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need it eventually to become panel data that look like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/672iBD92E9C025DDFA61/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Screen Shot 2015-10-28 at 11.36.33 AM.png" title="Screen Shot 2015-10-28 at 11.36.33 AM.png" /&gt;&lt;/P&gt;
&lt;P&gt;which is just copy the first few rows and transpose them next to the price column, and then drag to the end to have the same value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since I have hundreds of excel files like this, it's not feasible to do it one file after another mannually. I wonder if there's way to program in SAS that can import all the excel files and for each file, structure to the final layout?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help will be greatly appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Xinxin&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 16:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232047#M5692</guid>
      <dc:creator>BellaLuna</dc:creator>
      <dc:date>2015-10-28T16:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read excel files with non-standard format and restructure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232060#M5693</link>
      <description>&lt;P&gt;Read the first 6 rows into SAS. Transpose this SAS data set. Then read the remaining rows and merge the remaining rows with the transposed data.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 16:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232060#M5693</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-28T16:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Read excel files with non-standard format and restructure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232066#M5694</link>
      <description>Thank you! Now I know it's doable. I'm very new to SAS and I apologize for the naiveness of the problem. But would you be willing to write down a somewhat code of the process that I can start to learn and adjust?</description>
      <pubDate>Wed, 28 Oct 2015 16:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232066#M5694</guid>
      <dc:creator>BellaLuna</dc:creator>
      <dc:date>2015-10-28T16:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Read excel files with non-standard format and restructure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232105#M5703</link>
      <description>&lt;P&gt;Untested code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="c:\mydata\yourexcelfile.xlsx" dbms=excel out=sasdatasetname;
    getnames=no;
run;
data header;
    set sasdatasetname(obs=6);
run;
proc transpose data=header out=transposed;
    var f2;
    id f1;
run;
data final;
    if _n_=1 then set transposed;
    set sasdatasetname(firstobs=7);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Oct 2015 18:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232105#M5703</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-10-28T18:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Read excel files with non-standard format and restructure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232126#M5705</link>
      <description>Thanks a bunch!</description>
      <pubDate>Wed, 28 Oct 2015 20:55:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232126#M5705</guid>
      <dc:creator>BellaLuna</dc:creator>
      <dc:date>2015-10-28T20:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Read excel files with non-standard format and restructure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232128#M5706</link>
      <description>&lt;P&gt;It sounds like you got the help you needed,&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_8" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/56622" target="_self"&gt;BellaLuna&lt;/A&gt;, that's great! Can you mark which answer worked by clicking "Accept as solution"?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Thanks and look forward to "seeing" more of you here on the community!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Anna&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 20:58:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232128#M5706</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2015-10-28T20:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Read excel files with non-standard format and restructure</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232129#M5707</link>
      <description>Done. Thanks.</description>
      <pubDate>Wed, 28 Oct 2015 20:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Read-excel-files-with-non-standard-format-and-restructure/m-p/232129#M5707</guid>
      <dc:creator>BellaLuna</dc:creator>
      <dc:date>2015-10-28T20:59:45Z</dc:date>
    </item>
  </channel>
</rss>

