<?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: DATA not getting populated in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751857#M39031</link>
    <description>&lt;P&gt;INFILE is for reading text files, and the actual reading has to be done with an INPUT statement.&lt;/P&gt;
&lt;P&gt;For Excel files, you have to either use PROC IMPORT or LIBNAME XLSX.&lt;/P&gt;</description>
    <pubDate>Sat, 03 Jul 2021 04:45:23 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-07-03T04:45:23Z</dc:date>
    <item>
      <title>DATA not getting populated</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751679#M39025</link>
      <description>&lt;P&gt;In the following code, data is not getting populated, only fields are displayed. Pls help.&lt;/P&gt;
&lt;P&gt;libname abc "C:\Users\cmp\Desktop\New folder";&lt;BR /&gt;data abc.a1;&lt;BR /&gt;infile "C:\Users\cmp\Desktop\New folder\Exams_list.xlsx" dsd;&lt;BR /&gt;length Student_name $15 Exam_name $30 Exam_date $70 Exam_points 8;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data abc.a2;&lt;BR /&gt;set abc.a1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 10:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751679#M39025</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-07-02T10:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: DATA not getting populated</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751683#M39026</link>
      <description>&lt;P&gt;I don't think you can do an INFILE statement to an Excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname abc xlsx "C:\Users\cmp\Desktop\New folder\exams_list.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then your data set abc.a1 will exist and you can use it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 10:45:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751683#M39026</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-02T10:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: DATA not getting populated</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751690#M39027</link>
      <description>&lt;H3 id="toc-hId--1880129410"&gt;Maxim 2&lt;/H3&gt;
&lt;H4 id="toc-hId--333832580" class="maxim-western"&gt;Read the log.&lt;/H4&gt;
&lt;P class="remark-western"&gt;Everything you need to know about your program is in the log. Interpreting messages and NOTEs is essential in finding errors.&lt;/P&gt;
&lt;P class="remark-western"&gt;(&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/ta-p/352068&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 10:54:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751690#M39027</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-07-02T10:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: DATA not getting populated</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751838#M39030</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; You cannot use the INFILE statement with an Excel file. If you need to see what's inside the Excel file prior to writing your code, I recommend PROC CONTENTS:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myxl xlsx "C:\Users\cmp\Desktop\New folder\Exams_list.xlsx";
  
proc contents data=myxl._all_ nods;
run;
 
libname myxl clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; If you know that the sheet you want to import is called a1 then something like this should work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myxl xlsx "C:\Users\cmp\Desktop\New folder\Exams_list.xlsx";
   
data work.fromXL;
  set myxl.a1;
run;
 
proc print data=work.fromXL;
run;
  
libname myxl clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; But, if you don't know the name of the sheet you need to import, then using PROC CONTENTS first will help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Also, since you posted this in the Enterprise Guide forum, you might not be able to read from or write to your local C: drive, especially if SAS is on a network server. And the other issue is that to use the XLSX engine, your SAS server will need to have SAS/Access for PC File Formats installed and the level of SAS on the server needs to be SAS 9.4 M2 or higher.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I hope these suggestions help you import your data so you can use it.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 23:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751838#M39030</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-07-02T23:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: DATA not getting populated</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751857#M39031</link>
      <description>&lt;P&gt;INFILE is for reading text files, and the actual reading has to be done with an INPUT statement.&lt;/P&gt;
&lt;P&gt;For Excel files, you have to either use PROC IMPORT or LIBNAME XLSX.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 04:45:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/DATA-not-getting-populated/m-p/751857#M39031</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-03T04:45:23Z</dc:date>
    </item>
  </channel>
</rss>

