<?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: IMPORT EXCEL file with minus sign in numeric value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694823#M211939</link>
    <description>&lt;P&gt;Pio - I don't understand the problem. When I ran your PROC IMPORT code, the data read in just fine.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data.png" style="width: 448px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51157i4AF18A79B17FAC46/image-dimensions/448x186?v=v2" width="448" height="186" role="button" title="Data.png" alt="Data.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Of course, the values in Rating are character, not numeric - but that's the way they are formatted in Excel. If you just want to convert the &lt;STRONG&gt;ratings&lt;/STRONG&gt;&amp;nbsp;column to numeric after the import, you can do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data pio.Dro_478par_s_2_fixed;
   set pio.Dro_478par_s_2(rename=(rating=_r));
   rating=input(_r,&lt;SPAN&gt;TRAILSGN.&lt;/SPAN&gt;);
   drop _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Oct 2020 12:28:01 GMT</pubDate>
    <dc:creator>SASJedi</dc:creator>
    <dc:date>2020-10-28T12:28:01Z</dc:date>
    <item>
      <title>IMPORT EXCEL file with minus sign in numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694791#M211920</link>
      <description>&lt;P&gt;Hi ALL,&lt;/P&gt;&lt;P&gt;executing a PROC IMPORT of Excel file, in the "RATING" variable, i find a dot value (.) instead of original value (2-).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the PROC IMPORT and EXPORT used is the following..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= pio.DRO_478PAR_S_2&lt;BR /&gt;DATAFILE= "C:\Users\393571\Desktop\IRION_Schedulatore\&amp;amp;BMRC\Monitoraggio_DRO\ALL\DRO_478PAR-S_2.xlsx"&lt;BR /&gt;DBMS=EXCEL REPLACE;&lt;BR /&gt;RANGE="Monitoraggio_DRO_478PAR-S_2_Fla$";&amp;nbsp;&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;MIXED=NO;&lt;BR /&gt;SCANTEXT=YES;&lt;BR /&gt;USEDATE=YES;&lt;BR /&gt;SCANTIME=YES;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;@@@@@@&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA= pio.DRO_478PAR_S_1_DIR2&lt;BR /&gt;OUTFILE= "C:\Users\393571\Desktop\IRION_Schedulatore\&amp;amp;BMRC\Monitoraggio_DRO\ALL\DRO_478PAR_S_1_DIR2.xlsx"&lt;BR /&gt;DBMS=EXCEL REPLACE;&lt;BR /&gt;SHEET="NDG_ARRICCHITI_DIR";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;moreover you'll find input (DRO_478PAR-S_2_SAS) and output (DRO478PAR-S_1_DIR2_SAS) .xlsx file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank's for your support , ever precious&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;don't esitate to ask for more details or deep analysis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;K Regards&lt;/P&gt;&lt;P&gt;Pio&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 10:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694791#M211920</guid>
      <dc:creator>yiapipi</dc:creator>
      <dc:date>2020-10-28T10:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORT EXCEL file with minus sign in numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694815#M211934</link>
      <description>&lt;P&gt;This is a common problem caused by excel not having typed columns. The value "2-" can only be stored in an alphanumeric variable, afaik, if you see "." in the dataset, then sas decided that the variable should be numeric. To permanently solve the issue drop excel as data-source and use csv instead.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 11:40:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694815#M211934</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-10-28T11:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORT EXCEL file with minus sign in numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694823#M211939</link>
      <description>&lt;P&gt;Pio - I don't understand the problem. When I ran your PROC IMPORT code, the data read in just fine.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data.png" style="width: 448px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51157i4AF18A79B17FAC46/image-dimensions/448x186?v=v2" width="448" height="186" role="button" title="Data.png" alt="Data.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Of course, the values in Rating are character, not numeric - but that's the way they are formatted in Excel. If you just want to convert the &lt;STRONG&gt;ratings&lt;/STRONG&gt;&amp;nbsp;column to numeric after the import, you can do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data pio.Dro_478par_s_2_fixed;
   set pio.Dro_478par_s_2(rename=(rating=_r));
   rating=input(_r,&lt;SPAN&gt;TRAILSGN.&lt;/SPAN&gt;);
   drop _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Oct 2020 12:28:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694823#M211939</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2020-10-28T12:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: IMPORT EXCEL file with minus sign in numeric value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694826#M211940</link>
      <description>&lt;P&gt;As soon as you read from a text file, SAS provides a fitting informat (TRAILSGN) to read such numbers.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 12:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/IMPORT-EXCEL-file-with-minus-sign-in-numeric-value/m-p/694826#M211940</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-28T12:18:45Z</dc:date>
    </item>
  </channel>
</rss>

