<?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: merging cells in CSV in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/merging-cells-in-CSV/m-p/969783#M376945</link>
    <description>&lt;P&gt;You may have an embedded carriage return in your quoted string. You can try the following:&lt;/P&gt;
&lt;P&gt;&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;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jun 2025 10:47:30 GMT</pubDate>
    <dc:creator>Kathryn_SAS</dc:creator>
    <dc:date>2025-06-26T10:47:30Z</dc:date>
    <item>
      <title>merging cells in CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-cells-in-CSV/m-p/969775#M376944</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which codes to use to address the problem&amp;nbsp; where the decription appears in the next cell? I wish to turn the informaiton which has over 5000 rows into a table .For example:t changing&amp;nbsp; the Table 1&amp;nbsp; which is csv format&amp;nbsp; to Table 2&lt;/P&gt;&lt;P&gt;Table 1 Csv format&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;85415900,"Other semiconductor devices, other than semiconductor-based transducers, other&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;than photosensitive devices, nesoi"&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;Table 2&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;HS code&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;85415900&lt;/TD&gt;&lt;TD&gt;Other semiconductor devices, other than semiconductor-based transducers, otherthan photosensitive devices, nesoi".&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 26 Jun 2025 09:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-cells-in-CSV/m-p/969775#M376944</guid>
      <dc:creator>Pnong</dc:creator>
      <dc:date>2025-06-26T09:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: merging cells in CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-cells-in-CSV/m-p/969783#M376945</link>
      <description>&lt;P&gt;You may have an embedded carriage return in your quoted string. You can try the following:&lt;/P&gt;
&lt;P&gt;&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;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 10:47:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-cells-in-CSV/m-p/969783#M376945</guid>
      <dc:creator>Kathryn_SAS</dc:creator>
      <dc:date>2025-06-26T10:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: merging cells in CSV</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merging-cells-in-CSV/m-p/969799#M376948</link>
      <description>&lt;P&gt;From the description is looks like the CSV file has end-of-line characters in the value of one of the fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are lucky it only has CR or LF in the field value and uses CR-LF as the end-of-line marker.&lt;/P&gt;
&lt;P&gt;Try reading the file using the TERMSTR=CRLF option on the INFILE (or FILENAME) statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the fields contain the same characters as used for the end-of-line markers then you will need to preprocess the file.&amp;nbsp; Since it looks like the field with the end-of-line marker is quoted you can use something that counts the number of quotes on a line to detect and remove or replace them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this macro to make a copy of the CSV file with the embedded CR and LF characters replaced (or removed):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sasutils/macros/blob/master/replace_crlf.sas" target="_blank" rel="noopener"&gt;https://github.com/sasutils/macros/blob/master/replace_crlf.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 13:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merging-cells-in-CSV/m-p/969799#M376948</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-06-26T13:39:31Z</dc:date>
    </item>
  </channel>
</rss>

