<?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: Proc Export to Excel result &amp;quot;corrupted&amp;quot; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-result-quot-corrupted-quot/m-p/342614#M63328</link>
    <description>&lt;P&gt;I suspect the only way to not get a message from&amp;nbsp; &lt;STRONG&gt;Excel&lt;/STRONG&gt; is to ensure the resultant file doesn't violate any of Excel's expectations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the value of &amp;amp;bucode? You may be trying to create a sheet name excel doesn't like.&lt;/P&gt;
&lt;P&gt;Another option would be to export to CSV and open that with Excel. At least with CSV you can see what your exported data looks like with any file viewer that supports plain text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There may also be a problem if none of your records match your where criteria.&lt;/P&gt;
&lt;P&gt;You might try making an actual subset of the data and not using a where dataset option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any diagnostics from the Proc Export like 0 records written?&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2017 14:57:06 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-03-20T14:57:06Z</dc:date>
    <item>
      <title>Proc Export to Excel result "corrupted"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-result-quot-corrupted-quot/m-p/342600#M63327</link>
      <description>&lt;P&gt;Using this code in SAS 9.4 TS1M0&amp;nbsp;to produce a large xl file ...&amp;nbsp; (56 columns, 48,000 rows)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;proc export data=GQBPlus_BU (where=(put(OwnerOpCd,&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$BUCd.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;)=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&amp;amp;BUCode"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Outfile= &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"\GQBPlus\&amp;amp;BuCode.\GQBPlus_&amp;amp;BUCode" /*path abbreviated*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;DBMS=xlsx Replace;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Sheet=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Local&amp;amp;BUCode"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Upon opening the excel file, this message comes up:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;We found a problem with some content in ... Full message attached as a jpg file. The file opens&amp;nbsp;upon a Yes answer and Excel produces an uninformative log.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;What needs to be changed to avoid the excel message?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Thank you,&lt;BR /&gt;Bill&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13581i5ED9C735B3780849/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Capture.JPG" title="Capture.JPG" /&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-result-quot-corrupted-quot/m-p/342600#M63327</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2017-03-20T14:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel result "corrupted"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-result-quot-corrupted-quot/m-p/342614#M63328</link>
      <description>&lt;P&gt;I suspect the only way to not get a message from&amp;nbsp; &lt;STRONG&gt;Excel&lt;/STRONG&gt; is to ensure the resultant file doesn't violate any of Excel's expectations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the value of &amp;amp;bucode? You may be trying to create a sheet name excel doesn't like.&lt;/P&gt;
&lt;P&gt;Another option would be to export to CSV and open that with Excel. At least with CSV you can see what your exported data looks like with any file viewer that supports plain text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There may also be a problem if none of your records match your where criteria.&lt;/P&gt;
&lt;P&gt;You might try making an actual subset of the data and not using a where dataset option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any diagnostics from the Proc Export like 0 records written?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-result-quot-corrupted-quot/m-p/342614#M63328</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-20T14:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export to Excel result "corrupted"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-result-quot-corrupted-quot/m-p/342657#M63332</link>
      <description>&lt;P&gt;Thank you ballardw for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An xl&amp;nbsp;file is "successfully" produced with the code used. I don't see a problem with the file, but it is disconcerting for users to see the message. Hence I'd like to avoid the situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The value of &amp;amp;BUcode is PCR - xl should like that!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried the csv route and it works well. Users will be delighted!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Bill&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 15:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-Export-to-Excel-result-quot-corrupted-quot/m-p/342657#M63332</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2017-03-20T15:54:35Z</dc:date>
    </item>
  </channel>
</rss>

