<?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 Excel On UNIX (SAS GRID) Corrupt As Email Attachment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801399#M315395</link>
    <description>&lt;P&gt;EG: 7.15&lt;/P&gt;
&lt;P&gt;EG Program creates an Excel file on UNIX SAS Grid.&lt;/P&gt;
&lt;P&gt;When attached to a EG Generated email the attachment (email generation is fine) is corrupt and can not be opened.&lt;/P&gt;
&lt;P&gt;User gets the 1st warning message then the 2nd MS noted file corrupt message.&lt;/P&gt;
&lt;P&gt;When moved (FTP) to local desktop the Excel file opens fine.&lt;/P&gt;
&lt;P&gt;Any thoughts... TIA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the EG SAS Code...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Setting up email routine to email the Excel to the users */&lt;BR /&gt;/******************************************************************/&lt;BR /&gt;FILENAME mymail EMAIL&lt;BR /&gt;Attach = '/xx/xx/Metric_ReWrite/Acctname_Metric_MatchStatus.xlsx';&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA _null_;&lt;BR /&gt;FILE mymail;&lt;BR /&gt;PUT "!EM_TO! (&amp;amp;NOTIFY.)";&lt;BR /&gt;PUT "!EM_CC! (&amp;amp;NOTIFYCC.)";&lt;BR /&gt;PUT "!EM_REPLYTO! (&amp;amp;REPLYTO.)";&lt;BR /&gt;PUT "!EM_SUBJECT! Testing Email Of Client Master List VS Master_New (File From UNIX SAS GRID)";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT " *** Testing to see if the Excel is still corrupt *** ";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT "** Confirm Attachment: Acctname_Metric_MatchStatus.xlsx";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT "&amp;lt;EOF&amp;gt; End Of Testing &amp;lt;EOF&amp;gt;";&lt;BR /&gt;PUT " ";&lt;BR /&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 17:16:45 GMT</pubDate>
    <dc:creator>JayS</dc:creator>
    <dc:date>2022-03-10T17:16:45Z</dc:date>
    <item>
      <title>Excel On UNIX (SAS GRID) Corrupt As Email Attachment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801399#M315395</link>
      <description>&lt;P&gt;EG: 7.15&lt;/P&gt;
&lt;P&gt;EG Program creates an Excel file on UNIX SAS Grid.&lt;/P&gt;
&lt;P&gt;When attached to a EG Generated email the attachment (email generation is fine) is corrupt and can not be opened.&lt;/P&gt;
&lt;P&gt;User gets the 1st warning message then the 2nd MS noted file corrupt message.&lt;/P&gt;
&lt;P&gt;When moved (FTP) to local desktop the Excel file opens fine.&lt;/P&gt;
&lt;P&gt;Any thoughts... TIA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the EG SAS Code...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/* Setting up email routine to email the Excel to the users */&lt;BR /&gt;/******************************************************************/&lt;BR /&gt;FILENAME mymail EMAIL&lt;BR /&gt;Attach = '/xx/xx/Metric_ReWrite/Acctname_Metric_MatchStatus.xlsx';&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA _null_;&lt;BR /&gt;FILE mymail;&lt;BR /&gt;PUT "!EM_TO! (&amp;amp;NOTIFY.)";&lt;BR /&gt;PUT "!EM_CC! (&amp;amp;NOTIFYCC.)";&lt;BR /&gt;PUT "!EM_REPLYTO! (&amp;amp;REPLYTO.)";&lt;BR /&gt;PUT "!EM_SUBJECT! Testing Email Of Client Master List VS Master_New (File From UNIX SAS GRID)";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT " *** Testing to see if the Excel is still corrupt *** ";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT "** Confirm Attachment: Acctname_Metric_MatchStatus.xlsx";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT " ";&lt;BR /&gt;PUT "&amp;lt;EOF&amp;gt; End Of Testing &amp;lt;EOF&amp;gt;";&lt;BR /&gt;PUT " ";&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 17:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801399#M315395</guid>
      <dc:creator>JayS</dc:creator>
      <dc:date>2022-03-10T17:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Excel On UNIX (SAS GRID) Corrupt As Email Attachment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801405#M315397</link>
      <description>&lt;P&gt;Maybe this&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/17/036.html" target="_blank" rel="noopener"&gt;17036 - DBASE, LNK, and Lotus 123 attachment files can get corrupted when sending via SMTP email (sas.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or this&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/EMAIL-device-with-xlsx-attachments/td-p/611619" target="_blank"&gt;Solved: EMAIL device with .xlsx attachments - SAS Support Communities&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 17:48:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801405#M315397</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-03-10T17:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Excel On UNIX (SAS GRID) Corrupt As Email Attachment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801456#M315419</link>
      <description>&lt;P&gt;Added the code, seems to include another file as an attachment, that is not an excel file.&lt;BR /&gt;It's odd as the new file has part of the email message in the file.&lt;/P&gt;
&lt;P&gt;I have to open in Notepad to read it...&lt;/P&gt;
&lt;P&gt;Still digging, thanks.&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 18:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801456#M315419</guid>
      <dc:creator>JayS</dc:creator>
      <dc:date>2022-03-10T18:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Excel On UNIX (SAS GRID) Corrupt As Email Attachment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801481#M315429</link>
      <description>&lt;P&gt;After digging around this nice simple code worked...&lt;/P&gt;
&lt;P&gt;Thanks, Jay&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas" style="background: #f6f6f6; margin: 0.5em 0px; padding: 1em; border-radius: 4px; border: 1px solid #cccccc; text-align: left; color: #2f3337; text-transform: none; line-height: 1.3; text-indent: 0px; letter-spacing: normal; overflow: auto; font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; font-size: 13px; font-style: normal; font-weight: 300; word-spacing: 0px; display: block; white-space: pre; -ms-word-break: normal; box-sizing: border-box; orphans: 2; widows: 2; text-shadow: 0px 1px white; tab-size: 4; hyphens: none; overflow-wrap: normal; text-decoration-color: initial; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial;"&gt;&lt;CODE&gt;filename outbox email
      from='abc@abc.com'
	  to='abc@abc.com' 
	  type='text/html'
	  subject='Test Mail'
	  attach=("/user/test.xlsx" content_type="excel");
	  
ods html body=outbox rs=none style=Htmlblue;

proc odstext;
p 'Hello,';
p ' Please find the attachment';
p 'Thank You';
title;
run;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 19:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801481#M315429</guid>
      <dc:creator>JayS</dc:creator>
      <dc:date>2022-03-10T19:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Excel On UNIX (SAS GRID) Corrupt As Email Attachment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801530#M315444</link>
      <description>&lt;P&gt;Why are you sending an HTML file but pretending it is an XLSX file?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 21:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excel-On-UNIX-SAS-GRID-Corrupt-As-Email-Attachment/m-p/801530#M315444</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-10T21:59:58Z</dc:date>
    </item>
  </channel>
</rss>

