<?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: reading data from xlsx file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352225#M63989</link>
    <description>&lt;P&gt;I don't want the result in Excel. I was just trying to think of a way to get SAS to read it. I should have pasted directly to the text editor.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2017 16:01:36 GMT</pubDate>
    <dc:creator>GreggB</dc:creator>
    <dc:date>2017-04-21T16:01:36Z</dc:date>
    <item>
      <title>reading data from xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352214#M63985</link>
      <description>&lt;P&gt;I copied a table from a pdf file that contained Exam Code and Exam Name and pasted it into Excel. The results were pasted into one column instead of two separate ones. &amp;nbsp;I want to read the data like so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Data I want:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Exam_Code &amp;nbsp; Exam_Name&lt;/P&gt;
&lt;P&gt;7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;United States History&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Art History&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;14 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Studio Art: Drawing Portfolio&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Data I have in Excel. (I also pasted it into Notepad with similar results).&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="337"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="337"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;United States History&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;13&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Art History&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;14&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Studio Art: Drawing Portfolio&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;15&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Studio Art: 2-D Design Portfolio&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;16&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Studio Art: 3-D Design Portfolio&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 21 Apr 2017 15:35:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352214#M63985</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2017-04-21T15:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352219#M63986</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13712"&gt;@GreggB&lt;/a&gt;: Then why not just input it the same way, i.e.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
  informat Exam_Name $50.;
  input Exam_Code/  Exam_Name &amp;amp;;
  cards;
7
United States History
13
Art History
14
Studio Art: Drawing Portfolio
;

&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 15:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352219#M63986</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-21T15:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352220#M63987</link>
      <description>&lt;P&gt;If you have Adobe Professional it can convert the doc to Excel or Word and will save the formatting, at least better than copy and paste.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't have Adobe Professional, you can use the second file, the txt file and easily read that in using SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;infile 'path to text file' truncover;&lt;/P&gt;
&lt;P&gt;input number /&amp;nbsp;name $20.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 15:49:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352220#M63987</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-21T15:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352221#M63988</link>
      <description>&lt;P&gt;Not actually a SAS related question.&lt;/P&gt;
&lt;P&gt;You likely need a PDF viewer/editor that has a "Copy TABLE" option to maintain the "columns" in the PDF table. If the PDF data is NOT a table then you're likely going to have a lot of work if you want the result in&lt;STRONG&gt; Excel&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that SAS can read that pasted text file (notepad)&amp;nbsp;with a proper data step. Something like&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; infile 'c:\path\filename.txt' truncover;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; informat exam_code best5. exam_name $50.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; input exam_code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /exam_name 1-50;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 15:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352221#M63988</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-21T15:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: reading data from xlsx file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352225#M63989</link>
      <description>&lt;P&gt;I don't want the result in Excel. I was just trying to think of a way to get SAS to read it. I should have pasted directly to the text editor.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 16:01:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reading-data-from-xlsx-file/m-p/352225#M63989</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2017-04-21T16:01:36Z</dc:date>
    </item>
  </channel>
</rss>

