<?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: SET statment for Excel file in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/395987#M3433</link>
    <description>&lt;P&gt;First, don't code all in uppercase, it makes code harder to read.&lt;/P&gt;
&lt;P&gt;If you need to know the names then open the library you create in the first line in the explorer - this will show you all the datasets available. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2017 15:42:56 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-09-14T15:42:56Z</dc:date>
    <item>
      <title>SET statment for Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/395959#M3431</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am supposed to create a LIBNAME statement to connect SAS to an Excel workbook named Diseases.xslx. There is a worksheet names FluData that may appear in the SAS library as FluData$&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;LIBNAME PubHlth EXCEL "C:\Diseases.xlsx";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt; WORK.FluAnalysis;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET [this needs to be specified];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the SET statement PubHealth.Diseases or PubHealth.FluData$?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 15:13:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/395959#M3431</guid>
      <dc:creator>marianhabesland</dc:creator>
      <dc:date>2017-09-14T15:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: SET statment for Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/395987#M3433</link>
      <description>&lt;P&gt;First, don't code all in uppercase, it makes code harder to read.&lt;/P&gt;
&lt;P&gt;If you need to know the names then open the library you create in the first line in the explorer - this will show you all the datasets available. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 15:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/395987#M3433</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-09-14T15:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: SET statment for Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/395995#M3435</link>
      <description>&lt;P&gt;The code provided to me was in all caps, so that's why it is that way. This question is hypothetical, so it is not actual data I have. The question is basically what you in general would put in the SET statement if you want to open an Excel file, whether it is the worksheet called FluData$ or the workbook called diseases.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 15:57:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/395995#M3435</guid>
      <dc:creator>marianhabesland</dc:creator>
      <dc:date>2017-09-14T15:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: SET statment for Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/396000#M3436</link>
      <description>&lt;P&gt;Well, hypothertically, I would put in the set statement whatever is created by SAS when it reads the Excel file, what else would you like me to say? &amp;nbsp;Libname excel creates a libname to and Excel file, and basically does a proc import on what it finds and can process within the Excel file. &amp;nbsp;If you file is a graph you will not get anything, if there are tabs of tabulated data then one dataset for each tab would be created, and tab name would be created a SAS compliant name or use literal naming, e.g. 'xyz'n.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 16:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/396000#M3436</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-09-14T16:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: SET statment for Excel file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/396567#M3442</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; The answer to your question depends on the LIBNAME statement you use to point to the Excel file. In your code, you show the use of the Excel engine, with the Excel engine, you would need to use the $ in the sheet name, as shown in this paper &lt;A href="http://www2.sas.com/proceedings/sugi31/020-31.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi31/020-31.pdf&lt;/A&gt; which illustrates the use of the EXCEL engine. Here's what is shown on that page (I recommend reading the paper if you are going to use the EXCEL engine, though):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="use_excel_engine.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15228i90EAEFCF624BB7C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="use_excel_engine.png" alt="use_excel_engine.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;On the other hand, if you switched to the XLSX engine, as described here: &lt;A href="http://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2015/05/20/using-libname-xlsx-to-read-and-write-excel-files/&lt;/A&gt; then you do NOT need to use a $ in the sheetname.&lt;BR /&gt;&lt;BR /&gt;Switching to the XLSX engine simplifies your code, if you can do it. If you are using SAS Studio or SAS University Edition and you have .XLSX files, then you could use the XLSX LIBNAME engine.&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 16 Sep 2017 13:38:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SET-statment-for-Excel-file/m-p/396567#M3442</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-09-16T13:38:49Z</dc:date>
    </item>
  </channel>
</rss>

