<?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: Why SAS email attachment works for CSV file but not xlsx? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/359527#M18627</link>
    <description>&lt;P&gt;Because of &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/64767"&gt;@brulard&lt;/a&gt;'s recent reply to this topic, it showed up on recent activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/38528"&gt;@Eusuee&lt;/a&gt;.&amp;nbsp; If you are still around, why not mark this topic as solved?&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 01:15:07 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2017-05-18T01:15:07Z</dc:date>
    <item>
      <title>Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198538#M13267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yesterday I tried to attach a file in email via SAS the first time, but the weird thing was, it worked fine if I attached the CSV file, but if I tried to attach a xlsx file, the attachment in email couldn't be opened.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then clicked on the attached file, it said "Excel found unreadable content in "filename.xlsx". Do you want to recover the contents of this workbook? If you trust the source of this workbook, click yes."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I clicked on yes, it showed another error message "Excel cannot open the file "filename.xlsx" because the file format or the file extension is not valid. Verify that the file has not been corrupted and the the file extension matches the format of the file."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the xlsx file, it looked all good and could be opened on local computer without question. Does anybody know what could cause the issue? Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; outmail &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;email&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;&lt;A href="mailto:'xxxx@xxxxxx.COM'"&gt;'xxxx@xxxxxx.COM'&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&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; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;"xxxxxxxxxxxxx"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;attach&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;"/xxx/xxxx/xxxx.xlsx"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 22:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198538#M13267</guid>
      <dc:creator>Eusuee</dc:creator>
      <dc:date>2015-03-10T22:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198539#M13268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue may be with how the xlsx file was created. If created in SAS provide example code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 22:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198539#M13268</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-03-10T22:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198540#M13269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc export data=outlib.test outfile="test.xlsx"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dbms=xlsx replace;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sheet="Data";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 22:22:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198540#M13269</guid>
      <dc:creator>Eusuee</dc:creator>
      <dc:date>2015-03-10T22:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198541#M13270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With Excel you need to add this to your FILENAME:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: Consolas; font-size: 9pt;"&gt;content_type&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: Consolas; font-size: 9pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: Consolas; font-size: 9pt;"&gt;"application/xlsx"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 22:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198541#M13270</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-03-10T22:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198542#M13271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks SASKiwi. I added content_type as you suggested but failed with the same error again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 22:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198542#M13271</guid>
      <dc:creator>Eusuee</dc:creator>
      <dc:date>2015-03-10T22:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198543#M13272</link>
      <description>&lt;P&gt;Try this, perhaps ordering is required. This works for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;attach=("Spreadsheet.xlsx"&amp;nbsp; content_type="application/xlsx")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If sending multiple files, specify the content type for each attachment. &amp;nbsp;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;attach=("Spreadsheet1.xlsx"  content_type="application/xlsx" 
"Spreadsheet2.xlsx"  content_type="application/xlsx" 
"Spreadsheet3.xlsx"  content_type="application/xlsx" 
"Spreadsheet4.xlsx"  content_type="application/xlsx")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 23:38:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198543#M13272</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-07-10T23:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198544#M13273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah it works now!!! So excited! Thanks a million SASKiwi!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 23:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/198544#M13273</guid>
      <dc:creator>Eusuee</dc:creator>
      <dc:date>2015-03-10T23:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/237806#M14800</link>
      <description>&lt;P&gt;Thank you SO much.&amp;nbsp; Just used this with a file created with the new ODS excel destination.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2015 13:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/237806#M14800</guid>
      <dc:creator>mg02492</dc:creator>
      <dc:date>2015-12-04T13:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/242126#M15021</link>
      <description>&lt;P&gt;Hi , I had a same problem. And took long time around this. With above solution. It is working fine. Thanks you very much. Fahim&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 21:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/242126#M15021</guid>
      <dc:creator>pathanfahim1986</dc:creator>
      <dc:date>2016-01-06T21:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/358984#M18615</link>
      <description>Experienced the same problem and this solved for it. Thanks!</description>
      <pubDate>Tue, 16 May 2017 12:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/358984#M18615</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2017-05-16T12:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/359527#M18627</link>
      <description>&lt;P&gt;Because of &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/64767"&gt;@brulard&lt;/a&gt;'s recent reply to this topic, it showed up on recent activity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/38528"&gt;@Eusuee&lt;/a&gt;.&amp;nbsp; If you are still around, why not mark this topic as solved?&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 01:15:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/359527#M18627</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-05-18T01:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/374715#M18936</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This solved my problem. I was sending some xlsx files to sharepoint by email and encountered with this problem. In my case I have several files to attach, so it worked for me only if I have&amp;nbsp;&lt;SPAN&gt;content_type&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"application/xlsx" next to all the files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;attach=("Spreadsheet1.xlsx"&amp;nbsp;&amp;nbsp;content_type="application/xlsx" "Spreadsheet2.xlsx"&amp;nbsp;&amp;nbsp;content_type="application/xlsx" "Spreadsheet3.xlsx"&amp;nbsp;&amp;nbsp;content_type="application/xlsx" "Spreadsheet4.xlsx"&amp;nbsp;&amp;nbsp;content_type="application/xlsx")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 21:10:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/374715#M18936</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2017-07-10T21:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why SAS email attachment works for CSV file but not xlsx?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/374731#M18937</link>
      <description>&lt;P&gt;Wow! Good to see this tip has helped so many.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 22:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-SAS-email-attachment-works-for-CSV-file-but-not-xlsx/m-p/374731#M18937</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-07-10T22:26:22Z</dc:date>
    </item>
  </channel>
</rss>

