<?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: Importing special characters from Excel to sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-special-characters-from-Excel-to-sas/m-p/797820#M313683</link>
    <description>&lt;P&gt;Thanks , I will try and let you know if this works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Feb 2022 14:22:23 GMT</pubDate>
    <dc:creator>NehaChopra</dc:creator>
    <dc:date>2022-02-22T14:22:23Z</dc:date>
    <item>
      <title>Importing special characters from Excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-special-characters-from-Excel-to-sas/m-p/797761#M313663</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp; &amp;nbsp; I have a study trial summary which have alpha and Gamma characters in the data. i am trying to import the xlsx file but it is excluding the special character. can some one please elp me with a code to import these special characters in into SAS format. &amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;code i am using&amp;nbsp; : &amp;nbsp; filename name "C:\STATISTICS\ Trial Design_Specs.xlsx"; proc import datafile = name out = ts1 dbms = xlsx replace ; sheet = 'TS' ; run ; &amp;nbsp; &amp;nbsp; data tss; length STUDYID $200. DOMAIN $200. TSSEQ 8. TSPARMCD $200. TSPARM $200. TSVAL $200.&amp;nbsp; TSVALNF $200. TSVALCD $200. TSVALCD $200. TSVCDREF $200.; TSVCDVER $200. ; set ts1; format _ALL_; informat _ALL_ ; run; &amp;nbsp; &amp;nbsp; data ts2 ; set tss(where=(studyid ne ''); TSVAL=strip(tranwrd(TSVAL, '0D0A'x, ' ')); run; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am getting the following warning in the log . &amp;nbsp; NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with options MSGLEVEL=I. WARNING: Some character data was lost during transcoding in column: TSVAL at obs 26. NOTE: The import data set has 67 observations and 14 variables. NOTE: WORK.TS1 data set was successfully created. NOTE: PROCEDURE IMPORT used (Total process time): &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&amp;nbsp; Neha&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 10:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-special-characters-from-Excel-to-sas/m-p/797761#M313663</guid>
      <dc:creator>NehaChopra</dc:creator>
      <dc:date>2022-02-22T10:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Importing special characters from Excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-special-characters-from-Excel-to-sas/m-p/797811#M313675</link>
      <description>&lt;P&gt;What I THINK might be going on here is that you are using an Excel spreadsheet containing Unicode characters and are trying to read that spreadsheet into ASCII (wlatin1) encoded SAS session. You can tell the SAS session encoding by submitting this code and looking in your log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;=sysencoding;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the log says:&lt;/P&gt;
&lt;PRE&gt;SYSENCODING=wlatin1&lt;/PRE&gt;
&lt;P&gt;then I'm pretty sure that's the issue. If it says this instead:&lt;/P&gt;
&lt;PRE&gt;SYSENCODING=utf-8&lt;/PRE&gt;
&lt;P&gt;then try reading the Excel file using the LIBNAME engine and a DATA step like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname xl "C:\STATISTICS\ Trial Design_Specs.xlsx"; 
data want;
   set xl.ts;
run;
libname xl clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and see if that helps...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 13:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-special-characters-from-Excel-to-sas/m-p/797811#M313675</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-02-22T13:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Importing special characters from Excel to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-special-characters-from-Excel-to-sas/m-p/797820#M313683</link>
      <description>&lt;P&gt;Thanks , I will try and let you know if this works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 14:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-special-characters-from-Excel-to-sas/m-p/797820#M313683</guid>
      <dc:creator>NehaChopra</dc:creator>
      <dc:date>2022-02-22T14:22:23Z</dc:date>
    </item>
  </channel>
</rss>

