<?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: export to excel in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286094#M59469</link>
    <description>&lt;P&gt;A LIBRARY is a place for SAS tables, views and catalogs. Excel files do not belong there. Store them somewhere else.&lt;/P&gt;
&lt;P&gt;Putting them into the same place where a library exists only creates confusion.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 12:21:08 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-07-21T12:21:08Z</dc:date>
    <item>
      <title>export to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286092#M59467</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After receiving feedback here I found that the only way I can import excel file to SAS is by FILE-IMPOER DATA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am asking about export to excel. When I open the FILE - EXPORT DATA I get the following window (attached).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to save the output of RESULTS in Library WORK or SASUSER, because I tried with no success&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="sas3.png" alt="sas3.png" src="https://communities.sas.com/t5/image/serverpage/image-id/4159i1AEFC2918537AD0B/image-size/original?v=v2&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 12:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286092#M59467</guid>
      <dc:creator>yael</dc:creator>
      <dc:date>2016-07-21T12:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286093#M59468</link>
      <description>&lt;P&gt;Yes, you just need to know the network path to those libnames. &amp;nbsp;If you right click on Work in explorer, you will see the network area, copy paste that in and it will save it there - they are only directories somewhere. &amp;nbsp;However, why would you want to? &amp;nbsp;It doesn't make sense, Work is a temporary work area which gets removed at the end of the session. &amp;nbsp;Sasuser is another SAS created folder - not for your use. &amp;nbsp;Create a proper directory somewhere and save your files to there.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 12:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286093#M59468</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-07-21T12:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286094#M59469</link>
      <description>&lt;P&gt;A LIBRARY is a place for SAS tables, views and catalogs. Excel files do not belong there. Store them somewhere else.&lt;/P&gt;
&lt;P&gt;Putting them into the same place where a library exists only creates confusion.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 12:21:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286094#M59469</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-07-21T12:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286267#M59488</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79659"&gt;@yael&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Now I am asking about export to excel. When I open the FILE - EXPORT DATA I get the following window (attached).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to save the output of RESULTS in Library WORK or SASUSER, because I tried with no success&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;RESULTS do not go into any library.&lt;/P&gt;
&lt;P&gt;To send things that end up in Results you would provide an ODS Destination for the procedures, the specific destination may depend on your needs. I typically use tagsets.Excelxp that creates XML readable by Excel for any non-graphic output.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods tagsets.excelxp file="c:\path\example.xlsx"; /* though I normally save as xml name*/&lt;/P&gt;
&lt;P&gt;proc print data=sashelp.class;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;ods tagsets.excelxp close;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;put your preferred path to the folder you want in place of C:\path.&lt;/P&gt;
&lt;P&gt;If your results are being generated as HTML you could use the File-Save as from the Results window to save as HTML and open with Excel.&lt;/P&gt;
&lt;P&gt;You may have access to ODS EXCEL which would work similar to the tagsets.excelxp example.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 20:32:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286267#M59488</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-21T20:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286643#M59512</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following your answer I tried the following code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ods&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; excel &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;file&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\Hedvay\Documents\excel1.xlsx'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;means&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;=sasuser.sasfile170716 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;mean&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;median&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;std&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;min&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;max&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; ROA;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; FIRMDEFI;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ods&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; excel &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;close&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;The answer I got in LOG window is:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods excel file='C:\Users\Hedvay\Documents\excel1.xlsx';&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;180&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;2 proc means data=sasuser.sasfile170716 mean median std min max;&lt;/P&gt;&lt;P&gt;3 var ROA;&lt;/P&gt;&lt;P&gt;4 class FIRMDEFI;&lt;/P&gt;&lt;P&gt;5 run;&lt;/P&gt;&lt;P&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;/P&gt;&lt;P&gt;NOTE: There were 4814 observations read from the data set SASUSER.SASFILE170716.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE MEANS used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.92 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.79 seconds&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;6 ods excel close;&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;180&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That means that I can't use it in SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any feedback&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2016 09:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286643#M59512</guid>
      <dc:creator>yael</dc:creator>
      <dc:date>2016-07-24T09:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286658#M59513</link>
      <description>&lt;P&gt;ods excel is a SAS v9.4 feature, if your not running that version, you won't have it. &amp;nbsp;If you are running that, then check the statements before the ods for errors, unfinished quotes or macros etc. which could be causing further issues.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2016 13:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/export-to-excel/m-p/286658#M59513</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-07-24T13:46:47Z</dc:date>
    </item>
  </channel>
</rss>

