<?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 Why I exported by using xlsx engine but the result appeared under csv datatype? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730555#M227492</link>
    <description>&lt;P&gt;Hi all SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am following a learning structure, the code to write output to an excel file is as below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xl_lib xlsx "&amp;amp;outpath/storm.&lt;STRONG&gt;xlsx&lt;/STRONG&gt;" ;

data xl_lib.&lt;STRONG&gt;storm_final&lt;/STRONG&gt;;
	set pg1.storm_final;
	drop Lat Lon Basin OceanCode;
run;

libname xl_lib clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where &amp;amp;outpath is a predetermined global macro.&lt;/P&gt;
&lt;P&gt;The code runs normally without any warnings or else. The thing here is: from the code, I expected that if I open the excel file storm_final, it should be an excel file. However, the story is different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_1-1617240875558.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56761iDD7DF08BBCBDA024/image-size/large?v=v2&amp;amp;px=999" role="button" title="Phil_NZ_1-1617240875558.png" alt="Phil_NZ_1-1617240875558.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I opened the file, what displays is:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_2-1617241138072.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56764iE7ED89B3D321CE73/image-size/large?v=v2&amp;amp;px=999" role="button" title="Phil_NZ_2-1617241138072.png" alt="Phil_NZ_2-1617241138072.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As can be seen from the picture, the file storm_final is written under the CSV type rather than the excel file, which is different from what I expected.&lt;/P&gt;
&lt;P&gt;The result from the instructor is&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_0-1617241055247.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56762i04ED269976136F14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Phil_NZ_0-1617241055247.png" alt="Phil_NZ_0-1617241055247.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please explain it to me and help me to sort it out?&lt;/P&gt;
&lt;P&gt;Warmest regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 01:48:42 GMT</pubDate>
    <dc:creator>Phil_NZ</dc:creator>
    <dc:date>2021-04-01T01:48:42Z</dc:date>
    <item>
      <title>Why I exported by using xlsx engine but the result appeared under csv datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730555#M227492</link>
      <description>&lt;P&gt;Hi all SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am following a learning structure, the code to write output to an excel file is as below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xl_lib xlsx "&amp;amp;outpath/storm.&lt;STRONG&gt;xlsx&lt;/STRONG&gt;" ;

data xl_lib.&lt;STRONG&gt;storm_final&lt;/STRONG&gt;;
	set pg1.storm_final;
	drop Lat Lon Basin OceanCode;
run;

libname xl_lib clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where &amp;amp;outpath is a predetermined global macro.&lt;/P&gt;
&lt;P&gt;The code runs normally without any warnings or else. The thing here is: from the code, I expected that if I open the excel file storm_final, it should be an excel file. However, the story is different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_1-1617240875558.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56761iDD7DF08BBCBDA024/image-size/large?v=v2&amp;amp;px=999" role="button" title="Phil_NZ_1-1617240875558.png" alt="Phil_NZ_1-1617240875558.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When I opened the file, what displays is:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_2-1617241138072.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56764iE7ED89B3D321CE73/image-size/large?v=v2&amp;amp;px=999" role="button" title="Phil_NZ_2-1617241138072.png" alt="Phil_NZ_2-1617241138072.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As can be seen from the picture, the file storm_final is written under the CSV type rather than the excel file, which is different from what I expected.&lt;/P&gt;
&lt;P&gt;The result from the instructor is&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_0-1617241055247.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56762i04ED269976136F14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Phil_NZ_0-1617241055247.png" alt="Phil_NZ_0-1617241055247.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please explain it to me and help me to sort it out?&lt;/P&gt;
&lt;P&gt;Warmest regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 01:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730555#M227492</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-04-01T01:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why I exported by usinhg xlsx engine but the result apeared under csv datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730561#M227493</link>
      <description>It mentions that your EXCEL WORKBOOK Name is "Storm.xlsx" and the Sheet Name is "Storm_Final". The code looks pretty good to me.</description>
      <pubDate>Thu, 01 Apr 2021 01:47:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730561#M227493</guid>
      <dc:creator>qoit</dc:creator>
      <dc:date>2021-04-01T01:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why I exported by using xlsx engine but the result appeared under csv datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730562#M227494</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/246836"&gt;@qoit&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your point, I just checked and yes, it is correct.&lt;/P&gt;
&lt;P&gt;Just wondering why SAS execute the code and resulted in the worksheet storm_final inside the workbook storm but also another csv storm_final outside the workbook storm as the picture above?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;
&lt;P&gt;Update: Maybe I created the csv file "storm_final" in advance that tricked my eyes. I try to delete the file csv storm_final, and rerun the code and it is good that the csv file storm_final no longer been created.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 01:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730562#M227494</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-04-01T01:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why I exported by usinhg xlsx engine but the result apeared under csv datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730563#M227495</link>
      <description>Quite unsure to be honest, from the code you have pasted above, there is no mention of a CSV output.</description>
      <pubDate>Thu, 01 Apr 2021 01:52:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730563#M227495</guid>
      <dc:creator>qoit</dc:creator>
      <dc:date>2021-04-01T01:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why I exported by using xlsx engine but the result appeared under csv datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730566#M227496</link>
      <description>&lt;P&gt;Your are not paying attention to the right part of your screen.&lt;/P&gt;
&lt;P&gt;Check out the DATETIME value in your screen shot.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 922px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56767i51DBC7C634AFA941/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 02:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730566#M227496</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-01T02:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why I exported by using xlsx engine but the result appeared under csv datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730567#M227497</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212695"&gt;@Phil_NZ&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/246836"&gt;@qoit&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your point, I just checked and yes, it is correct.&lt;/P&gt;
&lt;P&gt;Just wondering why SAS execute the code and resulted in the worksheet storm_final inside the workbook storm but also another csv storm_final outside the workbook storm as the picture above?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;
&lt;P&gt;Update: Maybe I created the csv file "storm_final" in advance that tricked my eyes. I try to delete the file csv storm_final, and rerun the code and it is good that the csv file storm_final no longer been created.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I was going to mention that the timestamp on the CSV in the picture you show is 15 minutes before the one on the Storm.Xlsx file. So likely an artifact of prior code you aren't showing.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 02:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-I-exported-by-using-xlsx-engine-but-the-result-appeared/m-p/730567#M227497</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-01T02:03:56Z</dc:date>
    </item>
  </channel>
</rss>

