<?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: Proc Import XLSX file explicit Null Values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327798#M73147</link>
    <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I used the formula below for the referenced cell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=IF(ISBLANK(Overlay!E4), "", Overlay!E4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will properly populate blanks into the cells, and SAS will now import these as nulls.&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2017 18:09:54 GMT</pubDate>
    <dc:creator>Terho</dc:creator>
    <dc:date>2017-01-26T18:09:54Z</dc:date>
    <item>
      <title>Proc Import XLSX file explicit Null Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327751#M73129</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have two excel files that I am importing below:&lt;/P&gt;&lt;P&gt;#1&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Total Balance&lt;/TD&gt;&lt;TD&gt;Target Balance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$473,480,802&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$450,109,462&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$427,654,020&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#2&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Total Balance&lt;/TD&gt;&lt;TD&gt;Target Balance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$436,301,145&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$340,967,812&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$293,301,145&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When, I import both and set together, SAS will translate the Null values in #1 to be 0, so my final table will be:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Total Balance&lt;/TD&gt;&lt;TD&gt;Target Balance&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$436,301,145&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$340,967,812&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$293,301,145&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$473,480,802&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$450,109,462&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$427,654,020&lt;/TD&gt;&lt;TD&gt;$0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I &lt;STRONG&gt;&lt;U&gt;want the null values to remain intact. &lt;/U&gt;&lt;/STRONG&gt;I want&amp;nbsp;NULL Target balances in row 4, 5, 6.&lt;/P&gt;&lt;P&gt;Anyone have any tips on how to keep the NULL values intact when I do the proc Import?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 16:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327751#M73129</guid>
      <dc:creator>Terho</dc:creator>
      <dc:date>2017-01-26T16:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Import XLSX file explicit Null Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327757#M73133</link>
      <description>&lt;P&gt;Provide better descriptions of your two datasets. Either the results of Proc Contents or use the instructions at &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;to provide a few rows of data as datastep code for each import result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a hard time believing that SAS set an actual "NULL" to 0. Did the Excel file have some sort of display set to show 0 as NULL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 16:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327757#M73133</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-01-26T16:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Import XLSX file explicit Null Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327764#M73135</link>
      <description>&lt;P&gt;Hm, it looks like I am importing a "referenced cell" to this source null cell.&lt;/P&gt;&lt;P&gt;So even though the referenced cell points to the Null field (source), the referenced cell returns a 0. Then SAS imports this 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I will look to see if Excel can keep the referenced cell null if the source cell is null. I believe this will require a special format?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Terrence&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 16:55:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327764#M73135</guid>
      <dc:creator>Terho</dc:creator>
      <dc:date>2017-01-26T16:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Import XLSX file explicit Null Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327771#M73138</link>
      <description>&lt;P&gt;Just put an if() around the cell reference, i.e.if(refcel not null,refcell.value,""):&lt;/P&gt;
&lt;P&gt;&lt;A href="https://exceljet.net/excel-functions/excel-if-function" target="_blank"&gt;https://exceljet.net/excel-functions/excel-if-function&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or save your data to a decent data medium, such as CSV and read it in correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 17:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327771#M73138</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-26T17:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Import XLSX file explicit Null Values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327798#M73147</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I used the formula below for the referenced cell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=IF(ISBLANK(Overlay!E4), "", Overlay!E4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will properly populate blanks into the cells, and SAS will now import these as nulls.&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 18:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Import-XLSX-file-explicit-Null-Values/m-p/327798#M73147</guid>
      <dc:creator>Terho</dc:creator>
      <dc:date>2017-01-26T18:09:54Z</dc:date>
    </item>
  </channel>
</rss>

