<?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: Output tables as Excel files in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82041#M23601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Have you looked at ODS? Or PROC EXPORT? Or the SAS Libname Engine for Excel? All of those methods of getting a data table into Excel have been discussed and demo'd on the forum. If you want "data to data" conversion, then PROC EXPORT or the LIBNAME engine will create true, binary Excel files for you from your SAS data table. If, however, you want colors and fonts and titles in your Excel workbook/worksheet, then ODS methods (such as ODS TAGSETS.EXCELXP or ODS MSOFFICE2K) will create result tables (such as from PROC PRINT) and your colors and formats and titles can still be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; It really depends on what you want to do and whether you have the SAS/Access modules to use EXPORT/LIBNAME engine methods. If you have BASE SAS, then you have ODS for the ODS methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2012 21:31:36 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2012-08-01T21:31:36Z</dc:date>
    <item>
      <title>Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82040#M23600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following SAS code that create individual tables based on a variable value (thanks to Haikuo for writing this code, you can see the full thread here &lt;A _jive_internal="true" href="https://communities.sas.com/message/133732#133732"&gt;https://communities.sas.com/message/133732#133732&lt;/A&gt;) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql NOPRINT;&lt;/P&gt;&lt;P&gt;select quote(CATS(name)) into :var separated by ',' from dictionary.columns where libname='SASUSER' AND MEMNAME='TEST';&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; dcl hash h(ordered: 'a');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; h.definekey('_n_');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; h.definedata (&amp;amp;VAR);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; h.definedone();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do _n_=1 by 1 until (last.entity);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set SASUSER.TEST;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by entity notsorted;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.add();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; h.output (dataset:'sasuser.'||compress(entity,,'kda'));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of right now the output are SAS tables and they are created in the SASUSER dataset. Is there an easy way to output all those tables to Excel files instead?&lt;/P&gt;&lt;P&gt;For example purpose the hard drive location can be c:\test\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 21:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82040#M23600</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-01T21:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82041#M23601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Have you looked at ODS? Or PROC EXPORT? Or the SAS Libname Engine for Excel? All of those methods of getting a data table into Excel have been discussed and demo'd on the forum. If you want "data to data" conversion, then PROC EXPORT or the LIBNAME engine will create true, binary Excel files for you from your SAS data table. If, however, you want colors and fonts and titles in your Excel workbook/worksheet, then ODS methods (such as ODS TAGSETS.EXCELXP or ODS MSOFFICE2K) will create result tables (such as from PROC PRINT) and your colors and formats and titles can still be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; It really depends on what you want to do and whether you have the SAS/Access modules to use EXPORT/LIBNAME engine methods. If you have BASE SAS, then you have ODS for the ODS methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 21:31:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82041#M23601</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-08-01T21:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82042#M23602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked at those functions, but my understanding (I am a real beginner in SAS) is that I will have to write a line of code for every SAS tables that have already been created with the code writen by Haikuo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I really want to do, is not to write the code to export each sas tables one by one to Excel, but to replace this line :&lt;/P&gt;&lt;P&gt; h.output (dataset:'sasuser.'||compress(entity,,'kda'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So instead of outputing directly in my work library in SAS format, it would export directly to my hard drive in Excel format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sure I am not fully understanding the functions stated above, but I am pretty sure that the datasets can be exported automatically to an excel file (keeping the name given by the variable entity). Could you please help me write this code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help and time. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 21:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82042#M23602</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-01T21:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82043#M23603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is SAS/Access for PC File Formats included in your SAS license?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 21:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82043#M23603</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-01T21:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82044#M23604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I think it is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 14:41:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82044#M23604</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-02T14:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82045#M23605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an alternative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also use the SAS Add-in for MS-Office.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 16:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82045#M23605</guid>
      <dc:creator>Kfhansen</dc:creator>
      <dc:date>2012-08-02T16:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82046#M23606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply LinLin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to make it work and I get those error messages :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;55&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; libname new "c:\test\&amp;amp;dsn..xls";&lt;BR /&gt;NOTE: Library NEW does not exist.&lt;/P&gt;&lt;P&gt;59&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new.SASUSER BLUE_CARS_TABLE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _____________________&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: ',', TABLE, VIEW.&amp;nbsp; &lt;/P&gt;&lt;P&gt;63&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data new.&amp;amp;dsn;&lt;BR /&gt;64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;65&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sasuser.&amp;amp;dsn;&lt;BR /&gt;ERROR: File SASUSER.SASUSER.DATA does not exist.&lt;BR /&gt;ERROR: File WORK.BLUE_CARS_TABLE does not exist.&lt;BR /&gt;66&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;67&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;ERROR: Library NEW does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me fix this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 17:18:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82046#M23606</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-02T17:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82047#M23607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I can't fix the problem and have deleted my post. I don't know how to get the dataset name created by the hash output method.&lt;/P&gt;&lt;P&gt;you can try the code below if you want to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data sasuser.test;&lt;BR /&gt;input entity $;&lt;BR /&gt;cards;&lt;BR /&gt;aaa&lt;BR /&gt;aaa&lt;BR /&gt;Aaa&lt;BR /&gt;bbb&lt;BR /&gt;BBB&lt;BR /&gt;ccc&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;BR /&gt;&amp;nbsp; select distinct(upcase(entity)) into :list separated by ' '&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from sasuser.test;&lt;BR /&gt;quit;&lt;BR /&gt;%macro test;&lt;BR /&gt; %do i=1 %to %sysfunc(countw(&amp;amp;list));&lt;BR /&gt; %let dsn=%scan(&amp;amp;list,&amp;amp;i);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table sasuser.&amp;amp;dsn as&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select * from sasuser.test&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where upcase(entity)="&amp;amp;dsn";&lt;BR /&gt; libname new "c:\temp\&amp;amp;dsn..xls";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; drop table new.&amp;amp;dsn;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; quit;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; data new.&amp;amp;dsn;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sasuser.&amp;amp;dsn;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp; libname new clear;&lt;BR /&gt;&amp;nbsp; %end;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt; %test&lt;BR /&gt; &lt;BR /&gt; log file:&lt;BR /&gt; &lt;BR /&gt; 845&amp;nbsp; data sasuser.test;&lt;BR /&gt;846&amp;nbsp; input entity $;&lt;BR /&gt;847&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;NOTE: The data set SASUSER.TEST has 6 observations and 1 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.03 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;854&amp;nbsp; ;&lt;BR /&gt;855&lt;BR /&gt;856&amp;nbsp; proc sql noprint;&lt;BR /&gt;857&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct(upcase(entity)) into :list separated by ' '&lt;BR /&gt;858&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from sasuser.test;&lt;BR /&gt;859&amp;nbsp; quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;860&amp;nbsp; %macro test;&lt;BR /&gt;861&amp;nbsp;&amp;nbsp; %do i=1 %to %sysfunc(countw(&amp;amp;list));&lt;BR /&gt;862&amp;nbsp;&amp;nbsp; %let dsn=%scan(&amp;amp;list,&amp;amp;i);&lt;BR /&gt;863&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc sql;&lt;BR /&gt;864&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table sasuser.&amp;amp;dsn as&lt;BR /&gt;865&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select * from sasuser.test&lt;BR /&gt;866&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where upcase(entity)="&amp;amp;dsn";&lt;BR /&gt;867&amp;nbsp;&amp;nbsp; libname new "c:\temp\&amp;amp;dsn..xls";&lt;BR /&gt;868&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop table new.&amp;amp;dsn;&lt;BR /&gt;869&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;BR /&gt;870&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data new.&amp;amp;dsn;&lt;BR /&gt;871&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set sasuser.&amp;amp;dsn;&lt;BR /&gt;872&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;873&amp;nbsp;&amp;nbsp;&amp;nbsp; libname new clear;&lt;BR /&gt;874&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;BR /&gt;875&amp;nbsp; %mend;&lt;BR /&gt;876&lt;BR /&gt;877&amp;nbsp;&amp;nbsp; %test&lt;BR /&gt;NOTE: Table SASUSER.AAA created, with 3 rows and 1 columns.&lt;/P&gt;&lt;P&gt;NOTE: Libref NEW was successfully assigned as follows:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Engine:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Physical Name: c:\temp\AAA.xls&lt;BR /&gt;NOTE: Table NEW.AAA has been dropped.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.10 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: There were 3 observations read from the data set SASUSER.AAA.&lt;BR /&gt;NOTE: The data set NEW.AAA has 3 observations and 1 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Libref NEW has been deassigned.&lt;BR /&gt;NOTE: Table SASUSER.BBB created, with 2 rows and 1 columns.&lt;/P&gt;&lt;P&gt;NOTE: Libref NEW was successfully assigned as follows:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Engine:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Physical Name: c:\temp\BBB.xls&lt;BR /&gt;NOTE: Table NEW.BBB has been dropped.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.09 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.03 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: There were 2 observations read from the data set SASUSER.BBB.&lt;BR /&gt;NOTE: The data set NEW.BBB has 2 observations and 1 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;NOTE: Libref NEW has been deassigned.&lt;BR /&gt;NOTE: Table SASUSER.CCC created, with 1 rows and 1 columns.&lt;/P&gt;&lt;P&gt;NOTE: Libref NEW was successfully assigned as follows:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Engine:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Physical Name: c:\temp\CCC.xls&lt;BR /&gt;NOTE: Table NEW.CCC has been dropped.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.09 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.04 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 18:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82047#M23607</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-08-02T18:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82048#M23608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the following ODS statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODS HMTL FILE="C:\TEMP.XLS";&lt;/P&gt;&lt;P&gt;PROC PRINT DATA=work.TEST;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;ODS HTML CLOSE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I get the following error :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS _ALL_ CLOSE;&lt;BR /&gt;NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices.&amp;nbsp; Graph defaults for these &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drivers may be different from other SAS/GRAPH device drivers.&amp;nbsp; For further information, please contact Technical Support.&lt;BR /&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS DEV=ACTIVEX;&lt;BR /&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILENAME EGHTML TEMP;&lt;BR /&gt;NOTE: Writing HTML(EGHTML) Body file: EGHTML&lt;BR /&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=EGDefault&lt;BR /&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! STYLESHEET=(URL="&lt;A&gt;file:///C:/Program%20Files/SAS/Shared%20Files/BIClientStyles/EGDefault.css&lt;/A&gt;")&lt;BR /&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! ATTRIBUTES=("CODEBASE"="&lt;A href="http://www2.sas.com/codebase/graph/v91/sasgraph.exe"&gt;http://www2.sas.com/codebase/graph/v91/sasgraph.exe&lt;/A&gt;") NOGTITLE NOGFOOTNOTE GPATH=&amp;amp;sasworklocation&lt;BR /&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! ;&lt;BR /&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %gaccessible;&lt;BR /&gt;WARNING 1-322: Assuming the symbol HTML was misspelled as HMTL.&lt;BR /&gt;NOTE: Writing HTML Body file: C:\TEMP.XLS&lt;BR /&gt;ERROR: Insufficient authorization to access /u01/app/sas/Config9.1.3/EMiner/Lev1/SASMain/C:\TEMP.XLS.&lt;BR /&gt;WARNING: No body file. HTML output will not be created.&lt;BR /&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS HMTL FILE="C:\TEMP.XLS";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ____&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC PRINT DATA=work.TEST;&lt;BR /&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt;NOTE: There were 373 observations read from the data set WORK.TEST.&lt;BR /&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.65 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.39 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS HTML CLOSE;&lt;BR /&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %LET _CLIENTTASKLABEL=;&lt;BR /&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %LET _EGTASKLABEL=;&lt;BR /&gt;21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %LET _SASPROGRAMFILE=;&lt;BR /&gt;23&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;*';*";*/;quit;run;&lt;BR /&gt;25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS _ALL_ CLOSE;&lt;BR /&gt;26&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;27&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;28&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QUIT; RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running SAS entreprise Guide 4.1 and the export to excel functions works great, but I can't access the code that was submitted to make this exportation. Anyone know an easy way to export to XLS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so I think the easier would be to write a loop so that every datasets in WORK library would be exported to xls :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete all tables in work libray&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Run my code that creates the sas tables in work library&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each dataset in work&lt;/P&gt;&lt;P&gt;export to .xls as "c:\" &amp;amp; datasetname &amp;amp; ".xls"&lt;/P&gt;&lt;P&gt;next dataset&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please help me write a code that would achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 19:01:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82048#M23608</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-02T19:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82049#M23609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the error you're getting I assume you are trying run code you wrote yourself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you run code like this pointing to a 'local' destination you need to make sure that your EG process is running on the local server as well and not on your server - SASApp or whatever your compute server is named.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 19:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82049#M23609</guid>
      <dc:creator>Kfhansen</dc:creator>
      <dc:date>2012-08-02T19:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82050#M23610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicnad, perhaps we can go back to the original question and use a different technique for pulling entity information from one file into different files. If you go back to using macros, we can sandwich some ODS code around the different entities so you will create a bunch of files for Excel. The .xml files can all be read by more current versions of Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; entity into :entity_list separated by ' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sasuser.test;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MACRO loop_through_entity_list;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %let entity_number = %eval(%sysfunc(count(&amp;amp;entity_list, %str( )))+1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %do i = 1 to &amp;amp;entity_number;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let this_entity = %scan(&amp;amp;entity_list, &amp;amp;i);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods tagsets.ExcelXP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file="/something/something_else/output/output_&amp;amp;this_entity..xml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options (embedded_titles='yes')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; style=sansPrinter;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from sasuser.test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where entity = &amp;amp;this_entity;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods tagsets.ExcelXP close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;%MEND loop_through_entity_list;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %loop_through_entity_list;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a lot simpler to debug. Note that I'm an ODS lightweight, so perhaps someone can make this code better for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 19:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82050#M23610</guid>
      <dc:creator>tish</dc:creator>
      <dc:date>2012-08-02T19:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82051#M23611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you tish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be the right way to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting an error at this line :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %MACRO loop_through_entity_list;&lt;/P&gt;&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let entity_number = %eval(%sysfunc(count(&amp;amp;entity_list, %str( )))+1);&lt;/P&gt;&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i = 1 to &amp;amp;entity_number;&lt;/P&gt;&lt;P&gt;ERROR: Expected %TO not found in %DO statement.&amp;nbsp; A dummy macro will be compiled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how to fix it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 20:07:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82051#M23611</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-02T20:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82052#M23612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"%do i=1 to ...... " should be "%do i=1 %to ... " thats all&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 20:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82052#M23612</guid>
      <dc:creator>Kfhansen</dc:creator>
      <dc:date>2012-08-02T20:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82053#M23613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for pointing this out Kfhansen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following errors :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insufficient authorization to access /u01/app/sas/Config9.1.3/EMiner/Lev1/SASMain/c:\BLUE.xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kfhansen pointed out that "When you run code like this pointing to a 'local' destination you need to make sure that your EG process is running on the local server as well and not on your server - SASApp or whatever your compute server is named." But I don't really know how to make EG run on my local server...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the entity variable contains values which are multiple words separated by space e.g. "blue car" and your macro variable only seems to pick up the first word.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you will be able to help me with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 20:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82053#M23613</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-02T20:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82054#M23614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can address only the blanks in the entity variable... You can write out the data to a macro variable using separated by something other than a blank. I'd use a character that isn't in your list of entities. Then set up your entity_number to count the number of those characters. Finally, set up this_entity using the optional third parameter used by the %SCAN macro function... So if you use asterisks as your separator, then that assignment would look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let this_entity = %scan(%entity_list, &amp;amp;i, *);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 21:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82054#M23614</guid>
      <dc:creator>tish</dc:creator>
      <dc:date>2012-08-02T21:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82055#M23615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at the top of your EG program editor you should see "Selected Server:&amp;nbsp; .. " next to the grayed out stop menu .. click that and choose local to execute locally.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="2346" alt="eg.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/2346_eg.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also as tish suggested I would add a seperator in your first sql where you create the list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select .... into this_list seperated by ','&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and change the %scan to %scan(&amp;amp;this_list,&amp;amp;x,",") &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 21:14:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82055#M23615</guid>
      <dc:creator>Kfhansen</dc:creator>
      <dc:date>2012-08-02T21:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82056#M23616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; In addition to all the other suggestions, related to your EG log, the log &lt;SPAN style="text-decoration: underline;"&gt;did&lt;/SPAN&gt; tell you what was wrong. Here's the warning:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #339966;"&gt;WARNING 1-322: Assuming the symbol HTML was misspelled as H&lt;SPAN style="color: #ff0000;"&gt;M&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;T&lt;/SPAN&gt;L.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;and here's the code you posted:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ODS &lt;SPAN style="color: #339966; font-size: 14pt;"&gt;H&lt;SPAN style="color: #ff0000;"&gt;M&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;T&lt;/SPAN&gt;L&lt;/SPAN&gt; FILE="C:\TEMP.XLS";&amp;nbsp; &amp;lt;--error in this line&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;PROC PRINT DATA=work.TEST;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ODS &lt;SPAN style="font-size: 14pt;"&gt;HTML&lt;/SPAN&gt; CLOSE;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that you opened the&lt;STRONG&gt; H&lt;SPAN style="text-decoration: underline;"&gt;MT&lt;/SPAN&gt;L&lt;/STRONG&gt; destination, but you closed the &lt;STRONG&gt;H&lt;SPAN style="text-decoration: underline;"&gt;TM&lt;/SPAN&gt;L&lt;/STRONG&gt; destination. There is no H&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;MT&lt;/STRONG&gt;&lt;/SPAN&gt;L destination. Usually, when you use ODS, the opening invocation and the closing invocation have to match. Also you tried to "fool" EG by naming the file with a .XLS extension. There is a good chance that when you use this technique, you canNOT open the file in EG. EG will want to show you the HTML file, as HTML, because EG knows that it created an HTML file. Just because you named the file with a .XLS extension does not mean that EG will launch Excel for you. Sometimes, you have to go to Windows Explorer and right click on the file or you have to go inside Excel and do a File --&amp;gt; Open in order to open the file that you create with ODS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, Microsoft doesn't really not like the "flavor" of HTML tags created by ODS HTML. By default ODS HTML creates HTML 4.0 tags. In response to the HTML 4.0 specification of the W3C, Microsoft wrote their own "flavor" of HTML for Office 2000. ODS can create the Microsoft "flavor" of HTML, but you would have to use this destination instead of ODS HTML:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ODS MSOFFICE2K FILE="C:\TEMP_MSO.XLS";&amp;nbsp; &amp;lt;--use Microsoft "flavor" of HTML&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;PROC PRINT DATA=work.TEST;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ODS MSOFFICE2K CLOSE;&amp;nbsp; &amp;lt;-- Close what was opened&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, still, EG will probably not want to open Excel for you automatically. If you open the file with Notepad, you will see HTML tags. Both Excel and EG know that there are HTML tags in the file. EG ignores the .XLS extension and shows you the file on the result tab using a browser-like viewer. Excel &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;will&lt;/STRONG&gt;&lt;/SPAN&gt; open the file, outside of EG; however, since you gave the file an XLS extension, Microsoft wants you to know, that it knows that you didn't really create a binary XLS file and so Excel will display a somewhat snarky message:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The file that you are trying to open "&lt;EM&gt;fileabc.xls&lt;/EM&gt;" is in a different format than&amp;nbsp;&amp;nbsp; specified by the file extension. Verify that the file is not corrupted and is from a&amp;nbsp; trusted source before opening the file. Do you want to open the file now.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(as described here: &lt;A href="http://support.sas.com/kb/31/956.html" title="http://support.sas.com/kb/31/956.html"&gt;http://support.sas.com/kb/31/956.html&lt;/A&gt;) All you have to do is click Yes to get Excel to open the file and render the HTML inside Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, aside from any other issues, this is what was happening in EG when you 1) misspelled the destination and 2) used a file extension of .XLS; Excel started to "harden" file extension in Office 2007. In the old days of SAS and Excel, if you named your HTML file with a .XLS extension, Excel would launch without complaint (in Office 97, Office 2000 and Office 2003). You are never creating a "true, binary" Excel file with ODS -- you are only creating ASCII text files that Excel knows how to open. EG pays more attention to the destination you use (HTML) than to the file extension you give the file. That just means that if you had NOT misspelled the destination, you would have needed to go outside of EG to find and open the output file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More information,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 22:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82056#M23616</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-08-02T22:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82057#M23617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the precision Cynthia.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still get an error when using the proper code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices.&amp;nbsp; Graph defaults for these&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drivers may be different from other SAS/GRAPH device drivers.&amp;nbsp; For further information, please contact Technical Support.&lt;/P&gt;&lt;P&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPTIONS DEV=ACTIVEX;&lt;/P&gt;&lt;P&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILENAME EGHTML TEMP;&lt;/P&gt;&lt;P&gt;NOTE: Writing HTML(EGHTML) Body file: EGHTML&lt;/P&gt;&lt;P&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=EGDefault&lt;/P&gt;&lt;P&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! STYLESHEET=(URL="&lt;A&gt;file:///C:/Program%20Files/SAS/Shared%20Files/BIClientStyles/EGDefault.css&lt;/A&gt;")&lt;/P&gt;&lt;P&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! ATTRIBUTES=("CODEBASE"="&lt;A href="http://www2.sas.com/codebase/graph/v91/sasgraph.exe"&gt;http://www2.sas.com/codebase/graph/v91/sasgraph.exe&lt;/A&gt;") NOGTITLE NOGFOOTNOTE GPATH=&amp;amp;sasworklocation&lt;/P&gt;&lt;P&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! ;&lt;/P&gt;&lt;P&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %gaccessible;&lt;/P&gt;&lt;P&gt;NOTE: Writing MSOFFICE2K Body file: C:\TEMP_MSO.XLS&lt;/P&gt;&lt;P&gt;ERROR: Insufficient authorization to access /u01/app/sas/Config9.1.3/EMiner/Lev1/SASMain/C:\TEMP_MSO.XLS.&lt;/P&gt;&lt;P&gt;WARNING: No body file. MSOFFICE2K output will not be created.&lt;/P&gt;&lt;P&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS MSOFFICE2K FILE="C:\TEMP_MSO.XLS";&lt;/P&gt;&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC PRINT DATA=work.NULL;&lt;/P&gt;&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know what is causing this error and how to solve it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 14:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82057#M23617</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-06T14:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82058#M23618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have the same interface as you, but when I go in the "code" menu and click choose a server, I don't have the choice to run it on local server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all for your help and time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 14:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82058#M23618</guid>
      <dc:creator>nicnad</dc:creator>
      <dc:date>2012-08-06T14:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Output tables as Excel files</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82059#M23619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Here are some other suggestions, but you might need to work with one of your colleagues who has more experience with SAS and/or work with Tech Support. The error message you got is very interesting. I don't have many solutions, just suggestions and questions. Solutions will have to come from Tech Support.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;NOTE: Writing MSOFFICE2K Body file: C:\TEMP_MSO.XLS&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;ERROR: Insufficient authorization to access /u01/app/sas/Config9.1.3/EMiner/Lev1/SASMain/C:\TEMP_MSO.XLS.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;WARNING: No body file. MSOFFICE2K output will not be created.&lt;/P&gt;&lt;P&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS MSOFFICE2K FILE="C:\TEMP_MSO.XLS";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1) the fact that you do not see a LOCAL choice for server tells me that SAS is not installed on your LOCAL computer -- you must have SAS only installed on a server. A complicating factor is: HOW is SAS installed:&lt;/P&gt;&lt;P&gt;--a) just a client/server install (with local EG and remote SAS on a server)&lt;/P&gt;&lt;P&gt;--b) as part of an Enterprise Miner install&lt;/P&gt;&lt;P&gt;--c) as part of a BI install&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The ERROR message above (&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;red&lt;/STRONG&gt;&lt;/SPAN&gt; highlighting mine tells me several different things:&lt;/P&gt;&lt;P&gt;--a. The Insufficiant authorization message tells me that your SAS server has a working directory defined for programs and you might not be allowed to write to that directory. Whether you believe this is correct or incorrect, operating system permissions are created by an admin inside your company. Someone at your company has set permissions in such a way that they do not expect you to or they do not want you to write to the directory on the SAS server. Or, you may have write permissions to that location (which I think is unlikely given the "Lev1" piece of the name), but, your FILE= combined with the default server directory generates an incorrect UNIX path -- read on.&lt;/P&gt;&lt;P&gt;--b. The fact that all the slashes go a different direction than the Windows slashes implies to me that your SAS is running on a UNIX flavor computer (or region or partition). And, since there are no UNIX boxes with a C: drive, you've probably generated an incorrect UNIX file name by putting that C:\ in the FILE= option. You might not get the same message if you did this:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ODS MSOFFICE2K FILE="TEMP_MSO.XLS";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT, your admin still may have locked down that physical directory. So, there's a good chance that this suggestion will NOT work.If you do not receive any error messages and you CAN write to&amp;nbsp; /u01/app/sas/Config9.1.3/Eminer/Lev1/SASMain directory path, then you will probably have to naviagate to that directory or FTP from that directory to your local machine to look at the file. As far as I know, there is no Microsoft Office for UNIX, so you'll have to get that file to your machine to open it. If you let EG do the download to your local machine, it will probably come down as an HTML File and you probably do not want that.&lt;/P&gt;&lt;P&gt;--c. The fact that you can't write to /u01/app/sas/Config9.1.3/Eminer/Lev1/SASMain coupled with the fact that EMINER is in the path name AND the fact that LEV1 is in the path name implies that you are using either Enterprise Miner standalone on a server or are using Enterprise Miner in a BI configuration. Or you could have both Enterprise Guide and Enterprise Miner. Or you could have EM and EG and the BI Platform -- and that is even more uncertainty about how you are trying to create your output. (Although most of your log looks like EG log messages, so I figure that someone possibly configured your EG to go to an Enterprise MIner directory) -- I find this confusing and possibly in need of more research on your part, either with guidance from Tech Support or guidance from your SAS Admin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;3) Since your FILE= string is appended to some default path, there is a possible resolution for this issue -- to use an explicit PATH= option:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ODS MSOFFICE2K PATH="C:\TEMP\" FILE="TEMP_MSO.XLS";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4) The fact that you also see a first ODS statement (created by EG) tells me that you have HTML turned on as the result type. I would recommend turning it off &lt;BR /&gt;(either using Tools--&amp;gt;Options)&lt;/P&gt;&lt;P&gt;or by -ADDING-&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ODS _ALL_ CLOSE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;at the very top of all your code -- to turn off the EG automatically created output and ONLY create your output. Leave the rest of your program the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point, you are close to exhausting the type of help that you can get on the Forum. It may be time to open a track with Tech Support for more personalized help. They can look at all your code, ask questions about your configuration and make some recommendations, based on what they figure out. In addition, if you have older versions of SAS, they can test your code in that earlier version of SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 17:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Output-tables-as-Excel-files/m-p/82059#M23619</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-08-06T17:29:24Z</dc:date>
    </item>
  </channel>
</rss>

