<?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 SAS EG output report issue in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622550#M19790</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a dataset final with around 40k records and I am trying to export it to xls with the below logic , it got exported and xls looks good as well but I didn't get SAS EG report because it is trying to print so run time error is coming and no SAS EG report is generated , finally my SAS EG session is frozen. Is there any way to overcome this issue ? Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*Export the file with the required fields*/&lt;BR /&gt;ods results off;&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods tagsets.excelxp file="Batch.xls" style=sansprinter;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp options(sheet_name = 'Sheet1' frozen_headers = '1');&lt;/P&gt;&lt;P&gt;proc print data= final noobs;&lt;BR /&gt;var Account_Number / style={TAGATTR='format:text'};&lt;BR /&gt;var CITY / style={TAGATTR='format:text'};&lt;BR /&gt;var CODE / style={TAGATTR='format:text'};&lt;BR /&gt;var COUNTRY / style={TAGATTR='format:text'};&lt;BR /&gt;var CUSTOMER_AGE / style={TAGATTR='format:text'};&lt;BR /&gt;var GENDER / style={TAGATTR='format:text'};&lt;BR /&gt;var LASTNAME / style={TAGATTR='format:text'};&lt;BR /&gt;var NAMETITLE / style={TAGATTR='format:text'};&lt;BR /&gt;var FIRSTNAME/ style={TAGATTR='format:text'};&lt;BR /&gt;var NAME_SUFFIX / style={TAGATTR='format:text'};&lt;BR /&gt;var POSTCODE / style={TAGATTR='format:text'};&lt;BR /&gt;var SUFFIX / style={TAGATTR='format:text'};&lt;BR /&gt;var mobile_phone / style={TAGATTR='format:text'};&lt;BR /&gt;var DOB / style={TAGATTR='format:text'};&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp close;&lt;BR /&gt;ods listing;&lt;BR /&gt;ods results on;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2020 20:41:56 GMT</pubDate>
    <dc:creator>AshokD</dc:creator>
    <dc:date>2020-02-05T20:41:56Z</dc:date>
    <item>
      <title>SAS EG output report issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622550#M19790</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a dataset final with around 40k records and I am trying to export it to xls with the below logic , it got exported and xls looks good as well but I didn't get SAS EG report because it is trying to print so run time error is coming and no SAS EG report is generated , finally my SAS EG session is frozen. Is there any way to overcome this issue ? Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*Export the file with the required fields*/&lt;BR /&gt;ods results off;&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods tagsets.excelxp file="Batch.xls" style=sansprinter;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp options(sheet_name = 'Sheet1' frozen_headers = '1');&lt;/P&gt;&lt;P&gt;proc print data= final noobs;&lt;BR /&gt;var Account_Number / style={TAGATTR='format:text'};&lt;BR /&gt;var CITY / style={TAGATTR='format:text'};&lt;BR /&gt;var CODE / style={TAGATTR='format:text'};&lt;BR /&gt;var COUNTRY / style={TAGATTR='format:text'};&lt;BR /&gt;var CUSTOMER_AGE / style={TAGATTR='format:text'};&lt;BR /&gt;var GENDER / style={TAGATTR='format:text'};&lt;BR /&gt;var LASTNAME / style={TAGATTR='format:text'};&lt;BR /&gt;var NAMETITLE / style={TAGATTR='format:text'};&lt;BR /&gt;var FIRSTNAME/ style={TAGATTR='format:text'};&lt;BR /&gt;var NAME_SUFFIX / style={TAGATTR='format:text'};&lt;BR /&gt;var POSTCODE / style={TAGATTR='format:text'};&lt;BR /&gt;var SUFFIX / style={TAGATTR='format:text'};&lt;BR /&gt;var mobile_phone / style={TAGATTR='format:text'};&lt;BR /&gt;var DOB / style={TAGATTR='format:text'};&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp close;&lt;BR /&gt;ods listing;&lt;BR /&gt;ods results on;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 20:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622550#M19790</guid>
      <dc:creator>AshokD</dc:creator>
      <dc:date>2020-02-05T20:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG output report issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622582#M19793</link>
      <description>&lt;P&gt;I suggest you try - ODS _ALL_ CLOSE; - at the start of your program. That should prevent any report output and only write to the Excel file. Also you may find using ODS EXCEL rather than EXCELXP works better as long as you are on a recent SAS version like 9.4M3 or later.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 00:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622582#M19793</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-02-06T00:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG output report issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622591#M19795</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/56202"&gt;@AshokD&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When running your code on a recent SAS version under RHEL using EG8.2 the code executes without errors but the Excel file created is somehow corrupted and I can't open it with a recent Excel version.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May be your EG is configured to something which tries to open this Excel automatically and that's when things go wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I still get the error when using .xlsx and when defining a fully valid output path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're on SAS 9.4 then try using the more modern ODS EXCEL destination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below code sample should work for you. Just change&amp;nbsp; &lt;CODE class=" language-sas"&gt;%let out_path=~;&lt;/CODE&gt;&amp;nbsp;to a path valid in your environment. The currently used ~ is a shortcut for a Unix home directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;

data class;
  set sashelp.class;
  format age z6.;
run;

%let out_path=~;
ods excel 
  file="&amp;amp;out_path/Batch.xlsx" 
  style=sansprinter
  options(
    start_at="1,1"
    frozen_headers="1"
    frozen_rowheaders="1"
    autofilter="all"
    sheet_name="Class"
    formulas="off"
    /*row_repeat="2"*/
    /*embedded_titles="yes"*/
    )
  ;

proc print data=class style(data)={TAGATTR='type:String'} noobs;
  var name sex age Height;
run;

ods excel close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2020 01:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622591#M19795</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-06T01:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG output report issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622605#M19801</link>
      <description>It's working fine now. Thanks</description>
      <pubDate>Thu, 06 Feb 2020 04:40:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-EG-output-report-issue/m-p/622605#M19801</guid>
      <dc:creator>AshokD</dc:creator>
      <dc:date>2020-02-06T04:40:51Z</dc:date>
    </item>
  </channel>
</rss>

