<?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: sas engine in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958151#M373985</link>
    <description>Thanks.&lt;BR /&gt;I understand that it is not correct that I didn't add xlsx file name to the library path. However first code didn't give any error but I didn't see the cars_xlsx file.&lt;BR /&gt;Also in screen I see that data set cars_xlsx was created .&lt;BR /&gt;So as I understand sas ignored xlsx statement that I wrote in libref statement&lt;BR /&gt;libname RRR xlsx "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim";&lt;BR /&gt;Data RRR.cars_XLSX;&lt;BR /&gt;set sashelp.cars;&lt;BR /&gt;Run;</description>
    <pubDate>Tue, 04 Feb 2025 03:09:50 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2025-02-04T03:09:50Z</dc:date>
    <item>
      <title>sas engine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958107#M373965</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create export sas data set sashelp.cars into xlsx file.&lt;/P&gt;
&lt;P&gt;I am using XLSX engine bia libname statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname RRR  xlsx "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim";
Data RRR.cars_XLSX;
set sashelp.cars;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then I close SAS session and open again and run following code to import the data from XLSX file into SAS data set and I see that it is working 100% and indeed the XLSX file exist&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname RRR  xlsx "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim";
Data cars;
SET  RRR.cars_XLSX;
Run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My question-&lt;/P&gt;
&lt;P&gt;In SAS session I look at the library and I don't see the file that I created&amp;nbsp;&amp;nbsp;cars_XLSX.&lt;/P&gt;
&lt;P&gt;Porbably because it is not a sas&amp;nbsp; data set.&lt;/P&gt;
&lt;P&gt;How can I see this file via SAS?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why I can see csv file but cant see xlsx file ?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ronein_0-1738613285954.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104287i42B53702ABD20674/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ronein_0-1738613285954.png" alt="Ronein_0-1738613285954.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 20:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958107#M373965</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2025-02-03T20:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: sas engine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958117#M373973</link>
      <description>&lt;P&gt;Huh?&amp;nbsp; &amp;nbsp;If you want to use the XLSX engine then it has to point to a FILE, not a directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use a file named cars.xlsx then say so in the libname statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname RRR  xlsx "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim/cars.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Your first code will work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname RRR  xlsx "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As long as there is not already a directory named&amp;nbsp;Targilim in the directory named&amp;nbsp;/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79.&amp;nbsp; If there is a directory with that name you cannot then make a FILE with the same name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But since you did not include the .xlsx extension on the file it will be hard to get Excel to open it.&amp;nbsp; You will probably need to use the File Open menu within Excel and it may well complain that the file extension does not match the content.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 20:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958117#M373973</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-02-03T20:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: sas engine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958151#M373985</link>
      <description>Thanks.&lt;BR /&gt;I understand that it is not correct that I didn't add xlsx file name to the library path. However first code didn't give any error but I didn't see the cars_xlsx file.&lt;BR /&gt;Also in screen I see that data set cars_xlsx was created .&lt;BR /&gt;So as I understand sas ignored xlsx statement that I wrote in libref statement&lt;BR /&gt;libname RRR xlsx "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim";&lt;BR /&gt;Data RRR.cars_XLSX;&lt;BR /&gt;set sashelp.cars;&lt;BR /&gt;Run;</description>
      <pubDate>Tue, 04 Feb 2025 03:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958151#M373985</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2025-02-04T03:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: sas engine</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958160#M373988</link>
      <description>&lt;P&gt;SHOW the LOG for this code running in a new session (just in case you have other stuff that changed the library).&lt;/P&gt;
&lt;PRE&gt;libname RRR xlsx "/usr/local/SAS/SASUsers/LabRet/UserDir/Udclk79/Targilim";
Data RRR.cars_XLSX;
set sashelp.cars;
Run; &lt;/PRE&gt;
&lt;P&gt;I strongly suspect the LOG will have something like (the d:\ is from my system)&lt;/P&gt;
&lt;PRE&gt;Error creating XLSX file -&amp;gt; d:\. .  It is either not an Excel spreadsheet
or it is damaged.   Error code=80001002
Requested Output File is Invalid
ERROR: File RRR.cars_XLSX.DATA does not exist.
&lt;/PRE&gt;
&lt;P&gt;The existence of a file named cars_XLSX doesn't mean that it was created by the limited code you show. It might have been from another attempt, possibly a LIBNAME without the XLSX engine option.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 04:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-engine/m-p/958160#M373988</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-02-04T04:34:53Z</dc:date>
    </item>
  </channel>
</rss>

