<?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 import from xls to sas dataset and keep all figures after 'dot' in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434166#M107726</link>
    <description>&lt;P&gt;Do I understand correctly that it worth to convert the xls into csv to keep all the figures after .dot? When I convert the file into .csv the max number of figures is 9, that is the case.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2018 14:18:54 GMT</pubDate>
    <dc:creator>DmytroYermak</dc:creator>
    <dc:date>2018-02-05T14:18:54Z</dc:date>
    <item>
      <title>How to import from xls to sas dataset and keep all figures after 'dot'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434155#M107722</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help with importing .xls dataset into sas dataset and keep all figures after dot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2018 10:23:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434155#M107722</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-03-05T10:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to import from xls to sas dataset and keep all figures after 'dot'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434162#M107724</link>
      <description>&lt;P&gt;Keep in mind that a SAS dataset has a maximum precision of ~ 15 decimal digits, owing to the way numbers are stored (8-byte real).&lt;/P&gt;
&lt;P&gt;Do a google search for "SAS numeric precision" for the hard facts behind it.&lt;/P&gt;
&lt;P&gt;Also keep in mind that (most) decimal fractions cannot be converted to binary without loss, because the binary numbers end up being periodic. 0.1 is just the simplest case.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 13:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434162#M107724</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-02-05T13:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to import from xls to sas dataset and keep all figures after 'dot'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434166#M107726</link>
      <description>&lt;P&gt;Do I understand correctly that it worth to convert the xls into csv to keep all the figures after .dot? When I convert the file into .csv the max number of figures is 9, that is the case.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 14:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434166#M107726</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-02-05T14:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to import from xls to sas dataset and keep all figures after 'dot'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434183#M107729</link>
      <description>&lt;P&gt;You need to assign a format with enough fractional digits before saving the sheet as .csv. Excel writes data to csv as displayed.&lt;/P&gt;
&lt;P&gt;Note that a textual format is inherently more usable than the native Excel format for transfer of data into SAS. With the Excel format, you have to rely on the guesses that SAS makes, while with a csv file, you have full control by manually writing the data step for the import. And you can inspect the data with a tool like notepad++.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 14:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434183#M107729</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-02-05T14:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to import from xls to sas dataset and keep all figures after 'dot'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434277#M107769</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;Have you tried adding a format when displaying the data, like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;suggested?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;

ods listing;

proc import file='C:\temp\temp.xlsx'
  dbms=excel
  out=work.excel
  replace;
run; quit;

title 'EXCEL Engine';
proc print data=work.excel;
  format estimate 32.25;
run; quit;

proc import file='C:\temp\temp.xlsx'
  dbms=xlsx
  out=work.xlsx
  replace;
run; quit;

title 'XLSX Engine';
proc print data=work.xlsx;
  format estimate 32.25;
run; quit;&lt;/CODE&gt;&lt;/PRE&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>Mon, 05 Feb 2018 17:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434277#M107769</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2018-02-05T17:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to import from xls to sas dataset and keep all figures after 'dot'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434330#M107783</link>
      <description>&lt;P&gt;I wanted to add that unfortunately I lost some figures after proc import. I do not know the reason but finally I had to use the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) to assign libname to the file;&lt;/P&gt;&lt;P&gt;2) to read directly from the 'sheet';&lt;/P&gt;&lt;P&gt;3) to convert numeric to character using best12. .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=any;

libname MDD pcfiles path='D:\Projects\filename.xls' scantime=yes;


data pkmdd;
  set MDD."Sheet1$"n;
run;
 
data ...;
 ....
   ORRES  = put(parameter,??best12.);
 ...
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 11:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-import-from-xls-to-sas-dataset-and-keep-all-figures-after/m-p/434330#M107783</guid>
      <dc:creator>DmytroYermak</dc:creator>
      <dc:date>2018-02-07T11:36:19Z</dc:date>
    </item>
  </channel>
</rss>

