<?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 Problem with content in Excel using ODS EXCEL and PROC REPORT in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513133#M21985</link>
    <description>&lt;P&gt;I am receiving an error similar to this previous post:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Analytics-U/Proc-print-to-an-Excel-file-produces-corrupt-file/td-p/330048" target="_blank"&gt;https://communities.sas.com/t5/SAS-Analytics-U/Proc-print-to-an-Excel-file-produces-corrupt-file/td-p/330048&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using PROC REPORT and ODS EXCEL to create a .xlsx file but when I go to open it, I receive this message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="excelerr1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24914i21D4BD3C74698577/image-size/large?v=v2&amp;amp;px=999" role="button" title="excelerr1.png" alt="excelerr1.png" /&gt;&lt;/span&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;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;If I click YES, and open, then I get output which contains only the fields which are numeric.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="excelerr2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24915i9124B2BC71F52EB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="excelerr2.png" alt="excelerr2.png" /&gt;&lt;/span&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;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;P&gt;My results window within SAS Studio do show that the characters printed.&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="excelerr3.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24916i15E95666C6F005DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="excelerr3.png" alt="excelerr3.png" /&gt;&lt;/span&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;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;P&gt;I don't think there's an issue with the data (but I could be wrong), because I can use PROC EXPORT and all character variables are present &amp;amp; populated.&amp;nbsp; I just can't use EXPORT because I need highlighting &amp;amp; formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ods excel file="&amp;amp;outfile" options(sheet_name="x") ;&lt;/P&gt;&lt;P&gt;proc report data=annot nowd headline headskip split='*' missing spacing=1&lt;BR /&gt;style(header)=[font=('Arial',8pt)]&lt;BR /&gt;style(column)=[font=('Arial',8pt)];&lt;BR /&gt;define color / display noprint;&lt;BR /&gt;compute color;&lt;BR /&gt;if color='Green' then call define(_row_, "style", "style=[background=lightGreen]");&lt;BR /&gt;else if color='Red' then call define(_row_, "style", "style=[background=lightRed]");&lt;BR /&gt;else if color='Yellow' then call define(_row_, "style", "style=[background=Yellow]");&lt;BR /&gt;else if color='White' then call define(_row_, "style", "style=[background=White]");&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;BR /&gt;ods excel close ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have suggestions on how I should proceed or what is causing my error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Nov 2018 22:36:59 GMT</pubDate>
    <dc:creator>TaniaRTP</dc:creator>
    <dc:date>2018-11-14T22:36:59Z</dc:date>
    <item>
      <title>Problem with content in Excel using ODS EXCEL and PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513133#M21985</link>
      <description>&lt;P&gt;I am receiving an error similar to this previous post:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Analytics-U/Proc-print-to-an-Excel-file-produces-corrupt-file/td-p/330048" target="_blank"&gt;https://communities.sas.com/t5/SAS-Analytics-U/Proc-print-to-an-Excel-file-produces-corrupt-file/td-p/330048&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using PROC REPORT and ODS EXCEL to create a .xlsx file but when I go to open it, I receive this message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="excelerr1.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24914i21D4BD3C74698577/image-size/large?v=v2&amp;amp;px=999" role="button" title="excelerr1.png" alt="excelerr1.png" /&gt;&lt;/span&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;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;If I click YES, and open, then I get output which contains only the fields which are numeric.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="excelerr2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24915i9124B2BC71F52EB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="excelerr2.png" alt="excelerr2.png" /&gt;&lt;/span&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;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;P&gt;My results window within SAS Studio do show that the characters printed.&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="excelerr3.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24916i15E95666C6F005DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="excelerr3.png" alt="excelerr3.png" /&gt;&lt;/span&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;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;P&gt;I don't think there's an issue with the data (but I could be wrong), because I can use PROC EXPORT and all character variables are present &amp;amp; populated.&amp;nbsp; I just can't use EXPORT because I need highlighting &amp;amp; formatting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ods excel file="&amp;amp;outfile" options(sheet_name="x") ;&lt;/P&gt;&lt;P&gt;proc report data=annot nowd headline headskip split='*' missing spacing=1&lt;BR /&gt;style(header)=[font=('Arial',8pt)]&lt;BR /&gt;style(column)=[font=('Arial',8pt)];&lt;BR /&gt;define color / display noprint;&lt;BR /&gt;compute color;&lt;BR /&gt;if color='Green' then call define(_row_, "style", "style=[background=lightGreen]");&lt;BR /&gt;else if color='Red' then call define(_row_, "style", "style=[background=lightRed]");&lt;BR /&gt;else if color='Yellow' then call define(_row_, "style", "style=[background=Yellow]");&lt;BR /&gt;else if color='White' then call define(_row_, "style", "style=[background=White]");&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;BR /&gt;ods excel close ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have suggestions on how I should proceed or what is causing my error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 22:36:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513133#M21985</guid>
      <dc:creator>TaniaRTP</dc:creator>
      <dc:date>2018-11-14T22:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with content in Excel using ODS EXCEL and PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513148#M21986</link>
      <description>&lt;P&gt;I have seen something similar before , and the cause was special characters in the data - in my case &amp;amp;nbsp .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to test this possibility -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try only writing 1 observation and see if the issue still occurs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc report data=annot&amp;nbsp;(obs=1) ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the issue still occurs , try&amp;nbsp;adding columns one at a time and see if error still occurs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;e.g.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;proc report data=annot(obs=1 keep=SiteNumber)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 23:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513148#M21986</guid>
      <dc:creator>34reqrwe</dc:creator>
      <dc:date>2018-11-14T23:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with content in Excel using ODS EXCEL and PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513424#M21990</link>
      <description>&lt;P&gt;I was able to pinpoint it as&amp;nbsp;observation #405 out of 473 by restricting observations.&amp;nbsp; Because&amp;nbsp;all of my datasets were doing similar, I tried using another dataset to determine if was the same subject or site causing the issue.&amp;nbsp; There doesn't appear to be&amp;nbsp;a clear culprit here.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513424#M21990</guid>
      <dc:creator>TaniaRTP</dc:creator>
      <dc:date>2018-11-15T16:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with content in Excel using ODS EXCEL and PROC REPORT</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513480#M21992</link>
      <description>&lt;P&gt;so you can now try restricting columns&amp;nbsp; . you should be able to identify which column/columns are causing the problem .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you find that it is a character column , try removing non printable characters and see if that works&lt;/P&gt;&lt;P&gt;i.e&lt;/P&gt;&lt;P&gt;new_col = compress( old_col, , 'wk')&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 17:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-with-content-in-Excel-using-ODS-EXCEL-and-PROC-REPORT/m-p/513480#M21992</guid>
      <dc:creator>34reqrwe</dc:creator>
      <dc:date>2018-11-15T17:42:57Z</dc:date>
    </item>
  </channel>
</rss>

