<?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: How to remove Apostrophe ( ' ) in each observation during PROC IMPORT of XLS file (excel 97-2003 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/374853#M65310</link>
    <description>&lt;P&gt;Another good example of why Excel is a really poor data medium, these "helpful" Excel bits. &amp;nbsp;I would suggest you save the file into CSV and then write a datastep to import the data into the model you know - i.e.&lt;/P&gt;
&lt;PRE&gt;data want;
  infile "mydata.csv";
  input status $ x y;
run;&lt;/PRE&gt;</description>
    <pubDate>Tue, 11 Jul 2017 09:41:17 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-07-11T09:41:17Z</dc:date>
    <item>
      <title>How to remove Apostrophe ( ' ) in each observation during PROC IMPORT of XLS file (excel 97-2003)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/374841#M65309</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having&amp;nbsp; trouble in importing XLS file to SAS data set. Proc Import works, but the SAS data set produces &lt;FONT color="#ff0000"&gt;all observation as CHAR.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I checked the XLS file (which is software generated file), and i have found that all observation has an APOSTROPHE ( ' ), whether it is&lt;/P&gt;
&lt;P&gt;CHAR or NUM header. While (1st Row) Header do not have this apostrophe ( ' ).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;How can i removed this apostrophe ( ' ), so that SAS can translate correct observation type in all header ?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: Find/Replace in Excel can't find apostrophe&amp;nbsp;( ' )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;XLS Numeric Header: &lt;STRONG&gt;With ( ' )&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="numcol.PNG" alt="numcol.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/10238iB71E71399CD71769/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;XLS Char Header: &lt;STRONG&gt;With ( ' )&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="charcol.PNG" alt="charcol.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/10239i8C4B1CA2D8829B86/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;XLS (First Row) Header: &lt;STRONG&gt;Without ( ' )&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="headcol.PNG" alt="headcol.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/10240i79BC621AF99E95F7/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CODE:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;proc&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;import&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= name&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datafile&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;fpath"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dbms&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=xls replace; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;getnames&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=yes;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datarow&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;mixed&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=no;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Karem&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 08:45:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/374841#M65309</guid>
      <dc:creator>Karem</dc:creator>
      <dc:date>2017-07-11T08:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove Apostrophe ( ' ) in each observation during PROC IMPORT of XLS file (excel 97-2003</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/374853#M65310</link>
      <description>&lt;P&gt;Another good example of why Excel is a really poor data medium, these "helpful" Excel bits. &amp;nbsp;I would suggest you save the file into CSV and then write a datastep to import the data into the model you know - i.e.&lt;/P&gt;
&lt;PRE&gt;data want;
  infile "mydata.csv";
  input status $ x y;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jul 2017 09:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/374853#M65310</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-11T09:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove Apostrophe ( ' ) in each observation during PROC IMPORT of XLS file (excel 97-2003</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/374862#M65311</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data name_new (rename=(
  status=_status
  x = _x
  y = _y
));
set name;
status = substr(_status,2);
x = input(substr(_x,2),best.);
y = input(substr(_y,2),best.);
drop _status _x _y;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;after the import.&lt;/P&gt;
&lt;P&gt;Or get rid of the crappy xls format, as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt; suggested.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 10:08:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/374862#M65311</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-11T10:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove Apostrophe ( ' ) in each observation during PROC IMPORT of XLS file (excel 97-2003</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/375241#M65326</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you! &lt;STRONG&gt;@KurtBremser&amp;nbsp;/ &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/45151"&gt;@RW9&lt;/a&gt;.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Converting to csv is simpler considering if there will be a numerous header.&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;best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Geof&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 08:57:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-remove-Apostrophe-in-each-observation-during-PROC-IMPORT/m-p/375241#M65326</guid>
      <dc:creator>Karem</dc:creator>
      <dc:date>2017-07-12T08:57:10Z</dc:date>
    </item>
  </channel>
</rss>

