<?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: Excel engine to import excel file into sas data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677235#M204271</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So as you said I need to write the name of sheet and not the name of the file??&lt;/P&gt;
&lt;P&gt;So How does SAS know to import this file and not another file?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The LIBNAME points to the Excel file. The data set name (for example, RRR.CARS, the data set name is CARS) points to the tab.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2020 14:11:05 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-08-17T14:11:05Z</dc:date>
    <item>
      <title>Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677193#M204262</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I know how to use excel engine to export sas data set into excel file.&lt;/P&gt;
&lt;P&gt;Let's say that I exported a sas data set into excel file.&lt;/P&gt;
&lt;P&gt;Let's say that a few days later I want to import this excel file into sas using excel engine.&lt;/P&gt;
&lt;P&gt;What is the way to do it please?&lt;/P&gt;
&lt;P&gt;I get error because the code of import using excel engine is not correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Excel engine to export sas data set into excel file*/
/*Export to excel file called Example that included one sheet called cars*/
libname RRR xlsx "/path/Example.xlsx";
data RRR.cars;
set sashelp.cars ;
run;
 

/*Excel engine to import excel file into sas data set*/
/****???????????How should I do it please???????*/
data cars;
set RRR.Example;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Aug 2020 12:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677193#M204262</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-08-17T12:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677197#M204263</link>
      <description>&lt;P&gt;&amp;nbsp;If you look at the Excel file that was created, you will see you have a sheet named CARS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore, when you want to import from that Excel file, you have to import the sheet named ______ (you fill in the blank).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, your SAS command has to look for RRR.__________ (you fill in the blank)&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 12:36:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677197#M204263</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-17T12:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677198#M204264</link>
      <description>&lt;P&gt;You use a different name (Example) for import than you used for export (cars). Otherwise, your code will work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 73         libname rrr xlsx "/folders/myfolders/ronein.xlsx";
 NOTE: Libref RRR was successfully assigned as follows: 
       Engine:        XLSX 
       Physical Name: /folders/myfolders/ronein.xlsx
 74         
 75         data rrr.cars;
 76         set sashelp.cars;
 77         run;
 
 NOTE: There were 428 observations read from the data set SASHELP.CARS.
 NOTE: The data set RRR.cars has 428 observations and 15 variables.
 NOTE: The export data set has 428 observations and 15 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.05 seconds
       cpu time            0.04 seconds
       
 
 78         
 79         
 80         data cars;
 81         set rrr.cars;
 82         run;
 
 NOTE: The import data set has 428 observations and 15 variables.
 NOTE: There were 428 observations read from the data set RRR.cars.
 NOTE: The data set WORK.CARS has 428 observations and 15 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.08 seconds
       cpu time            0.06 seconds
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Aug 2020 12:35:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677198#M204264</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-08-17T12:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677199#M204265</link>
      <description>&lt;P&gt;Which brings up the question ... why are you saving this data in Excel and then reading it from Excel later?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Why not just save it as a permanent SAS data set? Much easier, IMHO.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 12:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677199#M204265</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-17T12:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677230#M204268</link>
      <description>&lt;P&gt;So as you said I need to write the name of sheet and not the name of the file??&lt;/P&gt;
&lt;P&gt;So How does SAS know to import this file and not another file?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 13:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677230#M204268</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-08-17T13:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677232#M204269</link>
      <description>&lt;P&gt;It is just to illustrate the situation of import excel file using excel engine&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 13:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677232#M204269</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2020-08-17T13:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677234#M204270</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So as you said I need to write the name of sheet and not the name of the file??&lt;/P&gt;
&lt;P&gt;So How does SAS know to import this file and not another file?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The name of the &lt;STRONG&gt;file&lt;/STRONG&gt; is given in the &lt;STRONG&gt;LIBNAME&lt;/STRONG&gt; statement.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 14:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677234#M204270</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-17T14:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Excel engine to import excel file into sas data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677235#M204271</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So as you said I need to write the name of sheet and not the name of the file??&lt;/P&gt;
&lt;P&gt;So How does SAS know to import this file and not another file?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The LIBNAME points to the Excel file. The data set name (for example, RRR.CARS, the data set name is CARS) points to the tab.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 14:11:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-engine-to-import-excel-file-into-sas-data-set/m-p/677235#M204271</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-17T14:11:05Z</dc:date>
    </item>
  </channel>
</rss>

