<?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 SAS data as Excel automatically from SAS Server to Local drive in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426344#M27463</link>
    <description>&lt;P&gt;1. ODS Excel does not work;&lt;/P&gt;
&lt;P&gt;-- Amazing,I can almost guess why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Add-on: Copy files from SAS Server to embed as a step in my project does not work as my dataset name keeps changing because of dynamic dates;&lt;/P&gt;
&lt;P&gt;-- Stop putting data in dataset names.&amp;nbsp; Dataset names are used in programming, not as a means to convey data.&amp;nbsp; Put data in the datasets.&amp;nbsp; Problem solved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. proc export - DBMS Excel does not work, and I prefer to use Excel instead of CSV in case the data format changes in my output and it will take time to check.&lt;/P&gt;
&lt;P&gt;-- Excel is a really poor format.&amp;nbsp; Its prevalance in use is due to it simple and flexible front end, however from a programming point of view it is possibly the worst format to store data in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To answer your question, you could use:&lt;/P&gt;
&lt;P&gt;ods tagsets,excelxp&lt;/P&gt;
&lt;P&gt;This creates plain text XML which can be read and parsed by Excel, however it is still text XML.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2018 09:18:26 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-01-10T09:18:26Z</dc:date>
    <item>
      <title>Export SAS data as Excel automatically from SAS Server to Local drive</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426318#M27461</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I'm using SAS Enterprise Guide 4.3, and I'm trying to export dataset with dynamic dates to Excel from SAS server to my local drive automatically. I have explored the following options but to no avail:&lt;/P&gt;&lt;P&gt;1. ODS Excel does not work;&lt;/P&gt;&lt;P&gt;2. Add-on: Copy files from SAS Server to embed as a step in my project does not work as my dataset name keeps changing because of dynamic dates;&lt;/P&gt;&lt;P&gt;3. proc export - DBMS Excel does not work, and I prefer to use Excel instead of CSV in case the data format changes in my output and it will take time to check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that someone might have an idea of how to do it, and apologies if it has been answered before.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 06:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426318#M27461</guid>
      <dc:creator>lk_88</dc:creator>
      <dc:date>2018-01-10T06:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Export SAS data as Excel automatically from SAS Server to Local drive</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426322#M27462</link>
      <description>&lt;P&gt;It's time to upgrade your SAS, then, so that dbms=excel and ods excel become available. EG 4.3 is also very old now, so upgrade that also.&lt;/P&gt;
&lt;P&gt;BTW csv is a&amp;nbsp;&lt;STRONG&gt;MUCH&lt;/STRONG&gt; more reliable format than Excel. And it doesn't need any license at all.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 06:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426322#M27462</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-10T06:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Export SAS data as Excel automatically from SAS Server to Local drive</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426344#M27463</link>
      <description>&lt;P&gt;1. ODS Excel does not work;&lt;/P&gt;
&lt;P&gt;-- Amazing,I can almost guess why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Add-on: Copy files from SAS Server to embed as a step in my project does not work as my dataset name keeps changing because of dynamic dates;&lt;/P&gt;
&lt;P&gt;-- Stop putting data in dataset names.&amp;nbsp; Dataset names are used in programming, not as a means to convey data.&amp;nbsp; Put data in the datasets.&amp;nbsp; Problem solved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. proc export - DBMS Excel does not work, and I prefer to use Excel instead of CSV in case the data format changes in my output and it will take time to check.&lt;/P&gt;
&lt;P&gt;-- Excel is a really poor format.&amp;nbsp; Its prevalance in use is due to it simple and flexible front end, however from a programming point of view it is possibly the worst format to store data in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To answer your question, you could use:&lt;/P&gt;
&lt;P&gt;ods tagsets,excelxp&lt;/P&gt;
&lt;P&gt;This creates plain text XML which can be read and parsed by Excel, however it is still text XML.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 09:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426344#M27463</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-10T09:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Export SAS data as Excel automatically from SAS Server to Local drive</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426346#M27464</link>
      <description>&lt;P&gt;Thank you for your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Noted, but my company is using SAS server 9.2, so EG 7.1 will not support it. Hopefully it will be upgraded soon.&lt;/P&gt;&lt;P&gt;Also, can I check whether this is the correct code to export?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Data to export */
%let lib  =      work;
%let datafile =  data1;
 
/* Local folder to download to */ 
%let download_to =  C:\folder;
 
/* detect proper delim for UNIX vs. Windows */
%let delim=%sysfunc(ifc(%eval(&amp;amp;sysscp. = WIN),\,/));
 
%let download_from =
  %sysfunc(getoption(work))&amp;amp;delim.&amp;amp;datafile..xlsx;
 
filename src "&amp;amp;download_from.";
 
proc export data=&amp;amp;lib..&amp;amp;datafile.
  dbms=Excel replace
  file=src
  replace;
run;

filename src clear;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then I will use the add-on to export out the files since the data can be a macro.&lt;/P&gt;&lt;P&gt;Do let me know if this will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 09:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426346#M27464</guid>
      <dc:creator>lk_88</dc:creator>
      <dc:date>2018-01-10T09:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Export SAS data as Excel automatically from SAS Server to Local drive</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426354#M27465</link>
      <description>&lt;P&gt;Although SAS does not officially support it, EG 7.1 works with a SAS 9.2 backend. We were using it here with SAS 9.2 on AIX before we migrated the server to 9.4.&lt;/P&gt;
&lt;P&gt;But that's not your problem. Your problem is 9.2, which should really be upgraded to 9.4 three days before yesterday. Really. I mean it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All that can of course be avoided by simply using a textual format for data transfer, which is the professional way to go here.&lt;/P&gt;
&lt;P&gt;- data can be inspected with a simple text editor&lt;/P&gt;
&lt;P&gt;- formats change only when YOU decide it, not when some ***** in Redmond has another brain fart.&lt;/P&gt;
&lt;P&gt;- CSV is CSV is CSV, for more than three decades now. I can't count how often I had to deal with inconsistencies in Excel files because of: see above&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you can't instruct EG to do something (read: copying data) from the SAS server side through code, you need to think of another method to get your data to the desktop. The simplest way would be to mount a network share on the SAS server and write your CSV files to that. Desktops can then read from there. A shared network drive also has the advantage that such resources are usually backed up regularly, giving you more data security.&lt;/P&gt;
&lt;P&gt;If your network/server admins don't want to do that, look into filename sftp to write your result files to a location accessible from your desktop(s).&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 09:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Export-SAS-data-as-Excel-automatically-from-SAS-Server-to-Local/m-p/426354#M27465</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-10T09:54:39Z</dc:date>
    </item>
  </channel>
</rss>

