<?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: SASProgramming1:E/Lesson 2: Accessing Data (activity). in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SASProgramming1-E-Lesson-2-Accessing-Data-activity/m-p/854433#M37648</link>
    <description>Thank you so much!!</description>
    <pubDate>Wed, 18 Jan 2023 20:10:56 GMT</pubDate>
    <dc:creator>linedpaper</dc:creator>
    <dc:date>2023-01-18T20:10:56Z</dc:date>
    <item>
      <title>SASProgramming1:E/Lesson 2: Accessing Data (activity).</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SASProgramming1-E-Lesson-2-Accessing-Data-activity/m-p/854209#M37615</link>
      <description>&lt;P&gt;I am doing the SAS Programming 1: Essentials / Lessons / Lesson 2: Accessing Data (activity).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Activity instructions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open a new program window. (done)&lt;/LI&gt;&lt;LI&gt;Write a LIBNAME statement to create a library named NP that reads np_info.xlsx in the course data as follows:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SAS Studio: Specify the full path to your&amp;nbsp;EPG1V2/data&lt;SPAN&gt;&amp;nbsp;folder and the&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;complete file name.&amp;nbsp;(done)&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Run the LIBNAME statement.&amp;nbsp;(done)&lt;/LI&gt;&lt;LI&gt;Navigate to your list of libraries and open the NP library. How many tables are there in the NP library? (here is the problem)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Everything seems to work except there are no tables (supposed to have Parks, Species, and Visits) in the NP library.&amp;nbsp; I have an NP library in the libraries section but when I try to expand to see the tables there is nothing to expand.&amp;nbsp; What have I done wrong?&lt;/P&gt;&lt;P&gt;Solutions I’ve tried:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Checked my answer was correct according to the activity (libname np xlsx "FILEPATH/np_info.xlsx";)&lt;/LI&gt;&lt;LI&gt;I looked under Files (Home) -&amp;gt; Data -&amp;gt; and there IS an excel file called np_info.xlsx&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 21:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SASProgramming1-E-Lesson-2-Accessing-Data-activity/m-p/854209#M37615</guid>
      <dc:creator>linedpaper</dc:creator>
      <dc:date>2023-01-17T21:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: SASProgramming1:E/Lesson 2: Accessing Data (activity).</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SASProgramming1-E-Lesson-2-Accessing-Data-activity/m-p/854226#M37619</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;When I run the activity to point to the np_info.xlsx file, I need an XLSX Libname statement to point to the workbook.In the problem, we use the word FILPATH to indicate where you have to substitute your location for the XLSX file:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1673996870145.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79464i42A4D0BD812F6A28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1673996870145.png" alt="Cynthia_sas_0-1673996870145.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So just using FILEPATH should result in errors in your SAS Log or in Physical File Not Found messages.&lt;/P&gt;
&lt;P&gt;When I code the LIBNAME statement for NP_INFO.XLSX, my libname statement looks like this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;libname np xlsx "&lt;FONT color="#FF00FF"&gt;/home/u12345678/EPG1V2/data/&lt;/FONT&gt;np_info.xlsx";&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that on my system, my Files (Home) location is /home/u12345678, but YOUR user folder location will be different on the SAS OnDemand server. Or, you could be using our Virtual Lab, in which case, the XLSX folder path will be different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The never-fail method for finding out the correct FILEPATH you need to use for YOUR libname statement is to go to&lt;STRONG&gt; Files (Home)&lt;/STRONG&gt; and expand, that top node, then expand the &lt;STRONG&gt;EPG1V2&lt;/STRONG&gt; main class folder, then expand the &lt;STRONG&gt;data&lt;/STRONG&gt; subfolder. If you right click on the data subfolder, you can choose Properties and then in the Location field of the Properties window, you should see the correct FILEPATH for your data subfolder. That is the path you need to substitute any time you see the FILEPATH placeholder in any of our instructions or starter code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Also, remember that you do NOT CLEAR the LIBNAME statement until after you go to the Libraries panel to look at the contents. The other way you can see the names of the individual sheets in the XLSX file is to use PROC CONTENTS like this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;libname np xlsx "&lt;FONT color="#FF00FF"&gt;/home/u12345678/EPG1V2/data/&lt;/FONT&gt;np_info.xlsx";&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc contents data=np._all_ nods;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;proc contents data=np.parks;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; And then, assuming you have the path correct, you should see the individual sheet names, if there are any, in the CONTENTS output.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1673997516787.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/79465i505E5AB5E629E371/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1673997516787.png" alt="Cynthia_sas_1-1673997516787.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I hope this helps you find the correct FILEPATH to your data. Since you can see the np_info.xlsx file under your data subfolder, you should only need to get the XLSX LIBNAME statement correctly specified to get this activity down.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;:&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 23:20:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SASProgramming1-E-Lesson-2-Accessing-Data-activity/m-p/854226#M37619</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-01-17T23:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: SASProgramming1:E/Lesson 2: Accessing Data (activity).</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SASProgramming1-E-Lesson-2-Accessing-Data-activity/m-p/854433#M37648</link>
      <description>Thank you so much!!</description>
      <pubDate>Wed, 18 Jan 2023 20:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SASProgramming1-E-Lesson-2-Accessing-Data-activity/m-p/854433#M37648</guid>
      <dc:creator>linedpaper</dc:creator>
      <dc:date>2023-01-18T20:10:56Z</dc:date>
    </item>
  </channel>
</rss>

