<?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: Attached excel file is corrupted on the mail in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Attached-excel-file-is-corrupted-on-the-mail/m-p/837324#M41535</link>
    <description>&lt;P&gt;I'm afraid you will need to share a lot more detail. Such a possibly the entire code for that macro and how you create the Excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you attempt to verify that the file was readable before you attached it to the email?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One very likely scenario that causes this error is that however you create the xlsx file still is connected to the file so it is 'locked' and could not actually be attached.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Oct 2022 07:14:49 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-10-07T07:14:49Z</dc:date>
    <item>
      <title>Attached excel file is corrupted on the mail</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Attached-excel-file-is-corrupted-on-the-mail/m-p/837315#M41534</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i use the below code to attach a file into a mail body and send , the mail attached excel cannot be open , says its corrupted. i use a&amp;nbsp;%MACRO sendMail(error=); to send the mail via SAS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let attach ='/xxxdata/xxxx/xxxxr/xxx/xxx/xxx/abc_qa.xlsx' (content_type="application/xlsx");&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 04:01:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Attached-excel-file-is-corrupted-on-the-mail/m-p/837315#M41534</guid>
      <dc:creator>Harin_Jay</dc:creator>
      <dc:date>2022-10-07T04:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Attached excel file is corrupted on the mail</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Attached-excel-file-is-corrupted-on-the-mail/m-p/837324#M41535</link>
      <description>&lt;P&gt;I'm afraid you will need to share a lot more detail. Such a possibly the entire code for that macro and how you create the Excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you attempt to verify that the file was readable before you attached it to the email?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One very likely scenario that causes this error is that however you create the xlsx file still is connected to the file so it is 'locked' and could not actually be attached.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 07:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Attached-excel-file-is-corrupted-on-the-mail/m-p/837324#M41535</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-07T07:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Attached excel file is corrupted on the mail</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Attached-excel-file-is-corrupted-on-the-mail/m-p/837329#M41536</link>
      <description>&lt;P&gt;Hope this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA= CPD_PD&lt;BR /&gt;OUTFILE= "/xxx/xxx/user/xxx/xxxx/xxxx/CPD_PD"&lt;BR /&gt;DBMS=xlsx REPLACE;&lt;BR /&gt;SHEET=xoxoxo;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%MACRO sendMail(error=);&lt;/P&gt;&lt;P&gt;%LET tolist='vidia@.com'&lt;BR /&gt;%LET cclist='harin.jay@com';&lt;BR /&gt;%LET sender=sassrv;&lt;BR /&gt;%LET subject=Due dates;&lt;BR /&gt;%let attach ='/sasdata/xxx/user/xxxx/xxxxL/xxxxxx/CPD_PD.xlsx' (content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");&lt;/P&gt;&lt;P&gt;PROC SQL NOPRINT;&lt;BR /&gt;create table myemail (c varchar(228));&lt;BR /&gt;insert into myemail values ("Dear All,");&lt;BR /&gt;insert into myemail values ("");&lt;BR /&gt;insert into myemail values ("The&amp;nbsp; dates of the future ");&lt;BR /&gt;insert into myemail values ("");&lt;BR /&gt;insert into myemail values ("");&lt;BR /&gt;insert into myemail values ("Best Regards,");&lt;BR /&gt;insert into myemail values (" Team");&lt;BR /&gt;insert into myemail values ("");&lt;BR /&gt;insert into myemail values ("");&lt;BR /&gt;insert into myemail values ("");&lt;BR /&gt;insert into myemail values ("************ ************");&lt;BR /&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%PUT NOTE: &amp;amp;tolist;&lt;BR /&gt;%PUT NOTE: &amp;amp;cclist;&lt;BR /&gt;%PUT NOTE: &amp;amp;sender;&lt;BR /&gt;%PUT NOTE: &amp;amp;subject;&lt;BR /&gt;%PUT NOTE: &amp;amp;attach;&lt;/P&gt;&lt;P&gt;FILENAME tmpcode TEMP;&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;FILE tmpcode MOD;&lt;/P&gt;&lt;P&gt;PUT '%ccrSendEmail(SenderID=';&lt;BR /&gt;PUT "&amp;amp;sender,";&lt;BR /&gt;PUT "To=&amp;amp;tolist,";&lt;BR /&gt;PUT "CC=&amp;amp;cclist,";&lt;BR /&gt;PUT "attach=&amp;amp;attach,";&lt;BR /&gt;PUT "Subject='&amp;amp;subject');";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;%INC tmpcode;&lt;BR /&gt;%PUT NOTE: email sent;&lt;BR /&gt;%MEND sendMail;&lt;BR /&gt;%MACRO Main();&lt;BR /&gt;%sendmail();&lt;BR /&gt;%MEND Main;&lt;BR /&gt;%Main();&lt;/P&gt;&lt;P&gt;%put job end execution at %sysfunc(time(),timeampm.) on %sysfunc(date(),worddate.);&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 07:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Attached-excel-file-is-corrupted-on-the-mail/m-p/837329#M41536</guid>
      <dc:creator>Harin_Jay</dc:creator>
      <dc:date>2022-10-07T07:36:41Z</dc:date>
    </item>
  </channel>
</rss>

