<?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: Problem with variable type - Import from Excel in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-variable-type-Import-from-Excel/m-p/112276#M31074</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there has been discussion on numeric to character variables as one imports from Excel into SAS.&lt;/P&gt;&lt;P&gt;Please see below this discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="35587" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best of luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jan 2013 18:29:09 GMT</pubDate>
    <dc:creator>AncaTilea</dc:creator>
    <dc:date>2013-01-02T18:29:09Z</dc:date>
    <item>
      <title>Problem with variable type - Import from Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-variable-type-Import-from-Excel/m-p/112275#M31073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am importing data from an Excel file. Many variables in my dataset contain mostly blank cells, with only a few containing numbers. However, when I import these variables into SAS, they are automatically encoded as character variables rather than numeric. This means that I cannot add them together, or perform any number of other necessary tasks. I am not sure how to resolve this issue - I have tried creating a "copy" of the variables in a data step (i.e., create a second variable that is equal to the first one when the first one is greater than zero) but because it's seeing character instead of numeric, that's not working at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to tell SAS to treat a variable as a numeric rather than a character, or does the problem have to be solved before importing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ian Cromwell&lt;/P&gt;&lt;P&gt;Vancouver, Canada&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 18:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-variable-type-Import-from-Excel/m-p/112275#M31073</guid>
      <dc:creator>Crommunist</dc:creator>
      <dc:date>2013-01-02T18:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable type - Import from Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-variable-type-Import-from-Excel/m-p/112276#M31074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there has been discussion on numeric to character variables as one imports from Excel into SAS.&lt;/P&gt;&lt;P&gt;Please see below this discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="35587" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best of luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 18:29:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-variable-type-Import-from-Excel/m-p/112276#M31074</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-01-02T18:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with variable type - Import from Excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-with-variable-type-Import-from-Excel/m-p/112277#M31075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can create numeric variable after importing:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt;num_variable=cha_variable*1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 18:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-with-variable-type-Import-from-Excel/m-p/112277#M31075</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-01-02T18:37:27Z</dc:date>
    </item>
  </channel>
</rss>

