<?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 SAS Program to remove Carriage Returns from .XLS extension files? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Program-to-remove-Carriage-Returns-from-XLS-extension-files/m-p/785429#M250659</link>
    <description>&lt;P&gt;Is there a way to programmatically remove carriage returns from .xls files in SAS?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Code here (&lt;A href="https://support.sas.com/kb/26/065.html" target="_blank"&gt;https://support.sas.com/kb/26/065.html&lt;/A&gt;) successfully removes carriage returns from CSV files.&amp;nbsp; Is there a similar code for xls files with multiple sheets?&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 16:41:56 GMT</pubDate>
    <dc:creator>mcook</dc:creator>
    <dc:date>2021-12-10T16:41:56Z</dc:date>
    <item>
      <title>SAS Program to remove Carriage Returns from .XLS extension files?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Program-to-remove-Carriage-Returns-from-XLS-extension-files/m-p/785429#M250659</link>
      <description>&lt;P&gt;Is there a way to programmatically remove carriage returns from .xls files in SAS?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Code here (&lt;A href="https://support.sas.com/kb/26/065.html" target="_blank"&gt;https://support.sas.com/kb/26/065.html&lt;/A&gt;) successfully removes carriage returns from CSV files.&amp;nbsp; Is there a similar code for xls files with multiple sheets?&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 16:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Program-to-remove-Carriage-Returns-from-XLS-extension-files/m-p/785429#M250659</guid>
      <dc:creator>mcook</dc:creator>
      <dc:date>2021-12-10T16:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program to remove Carriage Returns from .XLS extension files?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Program-to-remove-Carriage-Returns-from-XLS-extension-files/m-p/785451#M250666</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/319809"&gt;@mcook&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there a way to programmatically remove carriage returns from .xls files in SAS?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Code here (&lt;A href="https://support.sas.com/kb/26/065.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/26/065.html&lt;/A&gt;) successfully removes carriage returns from CSV files.&amp;nbsp; Is there a similar code for xls files with multiple sheets?&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You could search on an EXCEL forum for code to modify XLS files.&lt;/P&gt;
&lt;P&gt;But why?&amp;nbsp; Just import the XLS file(s) into SAS datasets and then you can change the CR or LF characters in the character variables into spaces or some other character.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile='myfile.xls' out=myfile replace dbms=xls;
run;
data myfile;
  set myfile;
  array _character_ _character_;
  do over _character_;
    _character_=translate(_character_,'  ','0A0D'x);
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Do you really have old XLS format files?&amp;nbsp; Not newer XLSX files?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 18:47:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Program-to-remove-Carriage-Returns-from-XLS-extension-files/m-p/785451#M250666</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-12-10T18:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Program to remove Carriage Returns from .XLS extension files?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Program-to-remove-Carriage-Returns-from-XLS-extension-files/m-p/785629#M250759</link>
      <description>&lt;P&gt;Once it's in CSV you can also use this macro to clean up the carriage returns:&amp;nbsp;&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__cleancsv_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__cleancsv_8sas.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Another option is a tool my team have produced, which is free for up to 5 users, and lets you import any version of excel (with data on any sheet, in any row, with columns in any order).&amp;nbsp; It can also be used to fix the carriage return issue:&amp;nbsp; &lt;A href="https://datacontroller.io" target="_blank"&gt;https://datacontroller.io&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Program-to-remove-Carriage-Returns-from-XLS-extension-files/m-p/785629#M250759</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-12-12T16:30:28Z</dc:date>
    </item>
  </channel>
</rss>

