<?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: how to transfer excel to SAS data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819216#M323385</link>
    <description>Thank you for your help;</description>
    <pubDate>Mon, 20 Jun 2022 22:03:36 GMT</pubDate>
    <dc:creator>tianerhu</dc:creator>
    <dc:date>2022-06-20T22:03:36Z</dc:date>
    <item>
      <title>how to transfer excel to SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819206#M323379</link>
      <description>&lt;P&gt;There are 12 sheets(from lab1 to lab12) in one excel file.&lt;/P&gt;
&lt;P&gt;I want to transfer lab1 to sas data set . The program is following :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname certadv xlsx 'C:\SAS data and program\data\data set used in OG of SAS adv\certadv\jijing.xlsx';
data certadv.lab1;
set certadv.'Lab1'n;
run;
proc print data = certadv.lab1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are error note in the log:&lt;/P&gt;
&lt;P&gt;67 libname certadv xlsx 'C:\SAS data and program\data\data set used in OG of SAS&lt;BR /&gt;67 ! adv\certadv\jijing.xlsx';&lt;BR /&gt;NOTE: Libref CERTADV was successfully assigned as follows:&lt;BR /&gt;Engine: XLSX&lt;BR /&gt;Physical Name: C:\SAS data and program\data\data set used in OG of SAS&lt;BR /&gt;adv\certadv\jijing.xlsx&lt;BR /&gt;68 data certadv.lab1;&lt;BR /&gt;69 set certadv.'Lab1'n;&lt;BR /&gt;ERROR: Couldn't find range or sheet in spreadsheet&lt;BR /&gt;ERROR: File CERTADV.Lab1.DATA does not exist.&lt;BR /&gt;70 run;&lt;/P&gt;
&lt;P&gt;There are no variables for the output file&lt;BR /&gt;ERROR: File CERTADV.lab1.DATA does not exist.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set CERTADV.lab1 was only partially opened and will not be saved.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;71 proc print data = certadv.lab1;&lt;BR /&gt;ERROR: Couldn't find range or sheet in spreadsheet&lt;BR /&gt;ERROR: File CERTADV.lab1.DATA does not exist.&lt;BR /&gt;72 run;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;******************************************************************************&lt;/P&gt;
&lt;P&gt;Please tell me how to correct my program , Thank you .&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 21:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819206#M323379</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2022-06-20T21:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to transfer excel to SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819208#M323380</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.lab1;
set certadv.'Lab1'n;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Try the following. For some reason, it doesn't think that the file has the sheet LAB1. Note that you also assigned the output of the data step it to the CERTADV file, which means you have file being written back to Excel. You probably want that to be WORK instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because a LIBNAME can be used to create or export files the fact that the library was created does not mean that the file path was correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Verify the file path and ensure it's correct and that the sheetname is exactly Lab1 with no spaces or other capitalizations.&amp;nbsp;&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;</description>
      <pubDate>Mon, 20 Jun 2022 21:37:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819208#M323380</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-06-20T21:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to transfer excel to SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819216#M323385</link>
      <description>Thank you for your help;</description>
      <pubDate>Mon, 20 Jun 2022 22:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819216#M323385</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2022-06-20T22:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to transfer excel to SAS data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819246#M323398</link>
      <description>&lt;P&gt;Run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname certadv xlsx 'C:\SAS data and program\data\data set used in OG of SAS adv\certadv\jijing.xlsx';

proc sql;
select memname from dictionary.tables
where libname = "CERTADV";
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is your Excel file located on your PC? If you use SAS on a remote server, you cannot access your C: drive like that.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 06:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-transfer-excel-to-SAS-data-set/m-p/819246#M323398</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-21T06:10:42Z</dc:date>
    </item>
  </channel>
</rss>

