<?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: XLSX Engine Name Literals in Windows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468433#M119643</link>
    <description>&lt;P&gt;Good points. But it seems not for this one. I tried 'SHeet1'n and 'sheet1'n. They all worked fine.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2018 16:11:10 GMT</pubDate>
    <dc:creator>ericliuzh1</dc:creator>
    <dc:date>2018-06-07T16:11:10Z</dc:date>
    <item>
      <title>XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468168#M119551</link>
      <description>&lt;P&gt;On P125 of&amp;nbsp;the Prep Guide 4th ed, it said "The Excel worksheet names have the special character ($) at the end... You must assign a name literal to the data set name." A follow-up example shows the Excel work sheet name is 'tests', so the name literal is 'tests$'n when running the DATA step, it's&amp;nbsp;like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA STRESS; SET RESULTS.'tests$'n; RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used my local file to practice.&amp;nbsp;I found&amp;nbsp;that I can run the DATA step successfully&amp;nbsp;without '$' at the end (still name literal like 'tests'n), but cannot make it&amp;nbsp;with '$' at the end ('tests$'n). My Excel version is Excel2016.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I get a&amp;nbsp;question in the real test, how should I answer it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 19:33:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468168#M119551</guid>
      <dc:creator>ericliuzh1</dc:creator>
      <dc:date>2018-06-06T19:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468172#M119553</link>
      <description>&lt;P&gt;My personal response would be convert the XLSX to CSV and control how the values appear using a data step to read the CSV.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using an actual XLSX libname statement or a pcfiles libname? And did your xlsx file have more than one worksheet?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Between versions of SAS, versions of XLSX files (some of which are actually HTML, CSV or something else that people just name with xlsx extensions)&amp;nbsp;and how "data" in Excel behaves because of things like multiple header rows I just plain don't trust any automatic conversion from Excel to SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But then I'm a curmudgeon and learned SAS before Windows could run SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 19:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468172#M119553</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-06T19:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468177#M119554</link>
      <description>&lt;P&gt;In theory, when you use RESULTS.tests (or RESULTS.'tests'n) you should be accessing a named range called tests&amp;nbsp;in your Excel workbook. A worksheet called tests should be accessed with RESULTS.'tests$'n. Note that it is possible to have both a worksheet and a named range called tests in the same workbook. In fact when you ask SAS to create a new&amp;nbsp;table in an Excel workbook, it creates both the worksheet to contain the data and a named range to point to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At least, it was like that the last time I checked.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 20:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468177#M119554</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-06-06T20:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468181#M119555</link>
      <description>&lt;P&gt;I am using actual XLSX libname statement as the follows,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME TEMP XLSX 'C:\...\FILENAME.XLSX';RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the .xlsx file related to my&amp;nbsp;question above&amp;nbsp;has only one worksheet. I then created a 2-worksheet .xlsx file to try again. Still, SAS gives me error message when I used '$' at the end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA TEMPS; SET ENRR.'sheet2$'n;run;&lt;/P&gt;&lt;P&gt;ERROR: Couldn't find range or sheet in spreadsheet&lt;/P&gt;&lt;P&gt;ERROR: File ENRR.'sheet2$'n.DATA does not exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, it is okay when I do not use '$' at the end of the sheet name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am preparing for the Base programmer test, so what I care about is how I should&amp;nbsp;answer the question when the Prep Guide said to use '$' at the end of the sheet name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 20:06:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468181#M119555</guid>
      <dc:creator>ericliuzh1</dc:creator>
      <dc:date>2018-06-06T20:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468184#M119556</link>
      <description>&lt;P&gt;I believe it's case sensitive as well, sheet2$ is not the same as Sheet2$.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 20:17:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468184#M119556</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-06T20:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468197#M119559</link>
      <description>&lt;P&gt;Agreed. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 21:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468197#M119559</guid>
      <dc:creator>ericliuzh1</dc:creator>
      <dc:date>2018-06-06T21:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468246#M119575</link>
      <description>&lt;P&gt;If you assign a LIBNAME to an Excel workbook using the EXCEL engine rather than XLSX you will get dataset names with a $ suffix. Using the XLSX engine results in dataset names without the $ suffix:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname MyExcel EXCEL "MyWorkbook.xlsx";&lt;/P&gt;
&lt;P&gt;versus&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;libname MyExcel XLSX "MyWorkbook.xlsx";&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 04:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468246#M119575</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-06-07T04:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468416#M119634</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/213598"&gt;@ericliuzh1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am using actual XLSX libname statement as the follows,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LIBNAME TEMP XLSX 'C:\...\FILENAME.XLSX';RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the .xlsx file related to my&amp;nbsp;question above&amp;nbsp;has only one worksheet. I then created a 2-worksheet .xlsx file to try again. Still, SAS gives me error message when I used '$' at the end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA TEMPS; SET ENRR.'sheet2$'n;run;&lt;/P&gt;
&lt;P&gt;ERROR: Couldn't find range or sheet in spreadsheet&lt;/P&gt;
&lt;P&gt;ERROR: File ENRR.'sheet2$'n.DATA does not exist&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, it is okay when I do not use '$' at the end of the sheet name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am preparing for the Base programmer test, so what I care about is how I should&amp;nbsp;answer the question when the Prep Guide said to use '$' at the end of the sheet name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Likely not related to a "test" but in reality attempting anything along these lines without examining the XLSX file to see if any of the "automated" results will work first is poor planning. If your xlsx file has two or more header rows, or spanning headers and "data" not starting in the first column many of the Proc import/ excel/ xlsx engine approaches may not quite work as intended.&lt;/P&gt;
&lt;P&gt;Also if the values are "stacked" such as age, height&amp;nbsp; and date of birth are all in the same column then you will have to parse the file anyway.&lt;/P&gt;
&lt;P&gt;Not to mention the headaches arising when the column headers have more than 32 characters, include special characters and have the same text for the first 32 or more characters. You may have a "dataset" but variable names such as VAR33 VAR45 because the column headers for columns 33 and 45 were the same as some other variable for the first 32 characters in columns 10 and 23 (guess which is similar to which).&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468416#M119634</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-07T15:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468433#M119643</link>
      <description>&lt;P&gt;Good points. But it seems not for this one. I tried 'SHeet1'n and 'sheet1'n. They all worked fine.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 16:11:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468433#M119643</guid>
      <dc:creator>ericliuzh1</dc:creator>
      <dc:date>2018-06-07T16:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468441#M119648</link>
      <description>&lt;P&gt;Good to know. Thanks. But the EXCEL engine does not work on my desktop.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 16:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468441#M119648</guid>
      <dc:creator>ericliuzh1</dc:creator>
      <dc:date>2018-06-07T16:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: XLSX Engine Name Literals in Windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468890#M119823</link>
      <description>&lt;P&gt;That might be due to the "bitness" problem - 64-bit SAS trying to read 32-bit MS Excel.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 23:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/XLSX-Engine-Name-Literals-in-Windows/m-p/468890#M119823</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-06-08T23:19:53Z</dc:date>
    </item>
  </channel>
</rss>

