<?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 Import data from MS access/Excel while retaining special characters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352237#M82077</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to import data from MS access and excel into SAS while retaining special characters such as mentioned below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;≤ &amp;nbsp;≥ , µ &amp;nbsp;Δ &amp;nbsp;χ &amp;nbsp;χ2 &amp;nbsp; ± &amp;nbsp;° &amp;nbsp;γ &amp;nbsp;β &amp;nbsp;º α – ö&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have spent hours searching for a way but haven't found a way. Ultimately these need to be printed in rtf/pdf reports. Is there a generic way in SAS to smoothly take source data into SAS dataset and then print it, without us programmatically managing each such character independently.&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;Vineet&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2017 16:36:50 GMT</pubDate>
    <dc:creator>vineet7878_gmail_com</dc:creator>
    <dc:date>2017-04-21T16:36:50Z</dc:date>
    <item>
      <title>Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352237#M82077</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need to import data from MS access and excel into SAS while retaining special characters such as mentioned below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;≤ &amp;nbsp;≥ , µ &amp;nbsp;Δ &amp;nbsp;χ &amp;nbsp;χ2 &amp;nbsp; ± &amp;nbsp;° &amp;nbsp;γ &amp;nbsp;β &amp;nbsp;º α – ö&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have spent hours searching for a way but haven't found a way. Ultimately these need to be printed in rtf/pdf reports. Is there a generic way in SAS to smoothly take source data into SAS dataset and then print it, without us programmatically managing each such character independently.&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;Vineet&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 16:36:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352237#M82077</guid>
      <dc:creator>vineet7878_gmail_com</dc:creator>
      <dc:date>2017-04-21T16:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352280#M82087</link>
      <description>&lt;P&gt;Are you getting errors? &amp;nbsp;If so, what errors are you getting? &amp;nbsp;If the data import, what is displayed when the data are imported?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 18:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352280#M82087</guid>
      <dc:creator>thomp7050</dc:creator>
      <dc:date>2017-04-21T18:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352284#M82090</link>
      <description>&lt;P&gt;I used two different approaches - proc Import and Libname statement to define source database. Either way, I didn't get any error. The SAS dataset after importing the data does no longer have non-ascii characters. Most of these are replaced with '?' and&amp;nbsp;&lt;SPAN&gt; ≤ is replaced by =. I tried modifying the encoding in libname statement to UTF-8. That didn't help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 18:37:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352284#M82090</guid>
      <dc:creator>vineet7878_gmail_com</dc:creator>
      <dc:date>2017-04-21T18:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352297#M82096</link>
      <description>&lt;P&gt;This is related, but it may not be the best news:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Importing-special-characters-from-Excel/td-p/29014" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Importing-special-characters-from-Excel/td-p/29014&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 19:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352297#M82096</guid>
      <dc:creator>thomp7050</dc:creator>
      <dc:date>2017-04-21T19:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352311#M82102</link>
      <description>&lt;P&gt;Well, I am hoping SAS software has the ability to import external data in utf-8/unicode. Limiting data to just ASCII characters is primitive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 19:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352311#M82102</guid>
      <dc:creator>vineet7878_gmail_com</dc:creator>
      <dc:date>2017-04-21T19:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352313#M82103</link>
      <description>&lt;P&gt;&lt;A href="https://www.pharmasug.org/proceedings/2016/BB/PharmaSUG-2016-BB15.pdf" target="_blank"&gt;https://www.pharmasug.org/proceedings/2016/BB/PharmaSUG-2016-BB15.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps page 4 could be the answer?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 19:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352313#M82103</guid>
      <dc:creator>thomp7050</dc:creator>
      <dc:date>2017-04-21T19:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352322#M82108</link>
      <description>&lt;P&gt;Is your SAS session using UTF-8 encoding?&lt;/P&gt;
&lt;P&gt;Are the characters really messed up in the data? Or just in your display windows? What happens if you print the data to HTML or other format of output that can handle UTF-8?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 20:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352322#M82108</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-21T20:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352335#M82112</link>
      <description>&lt;P&gt;Thanks, I need to experiment a bit. I will also try to change the session to UTF-8 and see if this works. To change the session ot UTF-8 I will need to modify the SAS configuration file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Vineet&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 21:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352335#M82112</guid>
      <dc:creator>vineet7878_gmail_com</dc:creator>
      <dc:date>2017-04-21T21:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352356#M82124</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;I was able import special characters when SAS 9.4 M3 on Windows was started with Unicode support. Save the attached "ImportSpecialCharacters.xlsx" and "ImportSpecialCharacters.xls" files in C:\temp, and then try running this code:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*;
*  Start SAS with Unicode support.
*    Start &amp;gt; All Programs &amp;gt; SAS &amp;gt; Additional Languages &amp;gt; SAS 9.4 (Unicode Support)
*;

*  XLSX File;

libname myxlsx xlsx 'C:\temp\ImportSpecialCharacters.xlsx' access=read;

data work.libname_xlsx;
set myxlsx.sheet1;
run;

proc import out=work.import_xlsx
  file='C:\temp\ImportSpecialCharacters.xlsx'
  dbms=xlsx
  replace;
run; quit;

proc import out=work.import_excelcs
  file='C:\temp\ImportSpecialCharacters.xlsx'
  dbms=excelcs
  replace;
run; quit;

*  XLS File;

libname myxls pcfiles path='C:\temp\ImportSpecialCharacters.xls' access=read;

data work.libname_pcfiles;
set myxlsx.sheet1;
run;

proc import out=work.import_excelcs
  file='C:\temp\ImportSpecialCharacters.xls'
  dbms=excelcs
  replace;
run; quit;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Note that you must have the SAS/ACCESS Interface to PC File Formats in order to read/write native Excel/Access files.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 23:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352356#M82124</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2017-04-21T23:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Import data from MS access/Excel while retaining special characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352421#M82146</link>
      <description>Thanks a lot. I didn't know about starting SAS in Unicode mode directly. This works.</description>
      <pubDate>Sat, 22 Apr 2017 12:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-special/m-p/352421#M82146</guid>
      <dc:creator>vineet7878_gmail_com</dc:creator>
      <dc:date>2017-04-22T12:40:40Z</dc:date>
    </item>
  </channel>
</rss>

