<?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: Errors reading data from Excel file into SAS (informat &amp;amp; format function) in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515388#M2908</link>
    <description>&lt;P&gt;To import an XLSX or XLS file you need to use PROC IMPORT. And unfortunately there isn't a way to specify what format/informat you want for the variables as you read them in. If you want to get around that you can convert the file to a csv and then write a data step to import the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/247648"&gt;@Kalu93&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm very new to SAS and trying to import data from this excel file using the &lt;EM&gt;infile&lt;/EM&gt; data step (i managed to import the data successfully using the import proc step) and can't seem to understand why its not working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to display the dates and associated variable into SAS however every time i run this code, SAS generates a . for each observation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought it was a formatting error and have tried multiple ways to read this information i can't figure it out, any help is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code and outputs i entered are below, specifically the use of informat and format functions;&lt;/P&gt;
&lt;P&gt;Also, only the first 33 of 123 observations are read,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-11-22 at 4.26.00 pm.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25127i96B97309C45C9AB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-11-22 at 4.26.00 pm.png" alt="Screen Shot 2018-11-22 at 4.26.00 pm.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-11-22 at 4.26.10 pm.png" style="width: 176px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25126iC6161011820D29C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-11-22 at 4.26.10 pm.png" alt="Screen Shot 2018-11-22 at 4.26.10 pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Nov 2018 15:54:01 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-11-22T15:54:01Z</dc:date>
    <item>
      <title>Errors reading data from Excel file into SAS (informat &amp; format function)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515286#M2884</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm very new to SAS and trying to import data from this excel file using the &lt;EM&gt;infile&lt;/EM&gt; data step (i managed to import the data successfully using the import proc step) and can't seem to understand why its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to display the dates and associated variable into SAS however every time i run this code, SAS generates a . for each observation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought it was a formatting error and have tried multiple ways to read this information i can't figure it out, any help is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code and outputs i entered are below, specifically the use of informat and format functions;&lt;/P&gt;&lt;P&gt;Also, only the first 33 of 123 observations are read,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-11-22 at 4.26.00 pm.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25127i96B97309C45C9AB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-11-22 at 4.26.00 pm.png" alt="Screen Shot 2018-11-22 at 4.26.00 pm.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-11-22 at 4.26.10 pm.png" style="width: 176px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25126iC6161011820D29C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-11-22 at 4.26.10 pm.png" alt="Screen Shot 2018-11-22 at 4.26.10 pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 05:33:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515286#M2884</guid>
      <dc:creator>Kalu93</dc:creator>
      <dc:date>2018-11-22T05:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Errors reading data from Excel file into SAS (informat &amp; format function)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515287#M2885</link>
      <description>&lt;P&gt;Infile and input in the data step are for text files. Excel files need proc import or libname Excel.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 05:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515287#M2885</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-11-22T05:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Errors reading data from Excel file into SAS (informat &amp; format function)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515296#M2887</link>
      <description>&lt;P&gt;Hi Kalu,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Welcome !! You can use PROC Import procedure .like below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="\\path\data.xls"
out=want dbms=excel replace;
run;

proc print data=want;
format date ddmmyy8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 06:56:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515296#M2887</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2018-11-22T06:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Errors reading data from Excel file into SAS (informat &amp; format function)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515388#M2908</link>
      <description>&lt;P&gt;To import an XLSX or XLS file you need to use PROC IMPORT. And unfortunately there isn't a way to specify what format/informat you want for the variables as you read them in. If you want to get around that you can convert the file to a csv and then write a data step to import the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/247648"&gt;@Kalu93&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm very new to SAS and trying to import data from this excel file using the &lt;EM&gt;infile&lt;/EM&gt; data step (i managed to import the data successfully using the import proc step) and can't seem to understand why its not working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to display the dates and associated variable into SAS however every time i run this code, SAS generates a . for each observation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought it was a formatting error and have tried multiple ways to read this information i can't figure it out, any help is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code and outputs i entered are below, specifically the use of informat and format functions;&lt;/P&gt;
&lt;P&gt;Also, only the first 33 of 123 observations are read,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-11-22 at 4.26.00 pm.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25127i96B97309C45C9AB9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-11-22 at 4.26.00 pm.png" alt="Screen Shot 2018-11-22 at 4.26.00 pm.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-11-22 at 4.26.10 pm.png" style="width: 176px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25126iC6161011820D29C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2018-11-22 at 4.26.10 pm.png" alt="Screen Shot 2018-11-22 at 4.26.10 pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 15:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515388#M2908</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-22T15:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Errors reading data from Excel file into SAS (informat &amp; format function)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515465#M2922</link>
      <description>Thank you for the clarification &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 23 Nov 2018 01:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515465#M2922</guid>
      <dc:creator>Kalu93</dc:creator>
      <dc:date>2018-11-23T01:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Errors reading data from Excel file into SAS (informat &amp; format function)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515467#M2923</link>
      <description>Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 23 Nov 2018 01:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515467#M2923</guid>
      <dc:creator>Kalu93</dc:creator>
      <dc:date>2018-11-23T01:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Errors reading data from Excel file into SAS (informat &amp; format function)</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515468#M2924</link>
      <description>&lt;P&gt;Thank you for the clarification &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 01:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Errors-reading-data-from-Excel-file-into-SAS-informat-amp-format/m-p/515468#M2924</guid>
      <dc:creator>Kalu93</dc:creator>
      <dc:date>2018-11-23T01:15:33Z</dc:date>
    </item>
  </channel>
</rss>

