<?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: Problem importing excel sheet into SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688359#M24595</link>
    <description>&lt;P&gt;If you don't check very closely you can find that Excel when saving a CSV can significantly change values. Really, like changing hyphenated values like 5-1, that should be character, into dates, and stripping leading zeros that are part of things like account numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please describe the exact problems you have been having with importing CSV files. One important consideration is that Proc Import only examines 20 rows of data by default before setting variable properties. So use of setting a large value for the Guessingrows option often fixes many of the issues people encounter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Oct 2020 20:41:40 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-10-01T20:41:40Z</dc:date>
    <item>
      <title>Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688341#M24590</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'm trying to import this dataset into SAS (it's the NHIS 2019 adult dataset). I downloaded it as a csv, but have been having trouble importing csv files into SAS, so I converted it into an excel file, which I've had success with in the past.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname nh "C:\users\Jodie-Ann\Documents\ile";&lt;/P&gt;&lt;P&gt;proc import out=nhis&lt;BR /&gt;datafile = "c:\users\\Jodie-Ann\Documents\ile\adult2019.xlsx"&lt;BR /&gt;dbms = excel replace;&lt;BR /&gt;sheet = "sheet2$";&lt;BR /&gt;range = "A1:TN31998";&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;MIXED=NO;&lt;BR /&gt;SCANTEXT=YES;&lt;BR /&gt;USEDATE=YES;&lt;BR /&gt;SCANTIME=YES;&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run I get this error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: SHEET name will be ignored if conflict occurs with RANGE name specified.&lt;BR /&gt;ERROR: File _IMEX_.'sheet2$A1:TN31998'n.DATA does not exist.&lt;BR /&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;BR /&gt;real time 0.44 seconds&lt;BR /&gt;cpu time 0.25 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've used this code before with a different data set that I converted from csv to excel, but not sure why it's not working this time. Any help would be appreciated, thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 20:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688341#M24590</guid>
      <dc:creator>J-Ann</dc:creator>
      <dc:date>2020-10-01T20:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688344#M24591</link>
      <description>&lt;P&gt;Is there a sheet in this spreadsheet named "&lt;SPAN&gt;sheet2"?&amp;nbsp; That is first thing to look for.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 20:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688344#M24591</guid>
      <dc:creator>CurtisMackWSIPP</dc:creator>
      <dc:date>2020-10-01T20:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688347#M24592</link>
      <description>Hi,&lt;BR /&gt;Yes Sheet2 is the one with all the data-points.</description>
      <pubDate>Thu, 01 Oct 2020 20:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688347#M24592</guid>
      <dc:creator>J-Ann</dc:creator>
      <dc:date>2020-10-01T20:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688348#M24593</link>
      <description>&lt;P&gt;What happens if you don't use the RANGE statement and if you call the sheet just Sheet2 (no dollar sign on the end)?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 20:26:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688348#M24593</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-10-01T20:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688349#M24594</link>
      <description>It's almost always easier to import CSV files and I would recommend you switch back. The quick lazy "trick" is to first run PROC IMPORT on your CSV file and then copy the code from the log and customize/correct it as needed. Most government data is designed to be imported via SAS so I'd give that a shot if you can. If you have issues, it is a public file so post the link and someone can likely help with the code needed to read the CSV.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Oct 2020 20:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688349#M24594</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-01T20:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688359#M24595</link>
      <description>&lt;P&gt;If you don't check very closely you can find that Excel when saving a CSV can significantly change values. Really, like changing hyphenated values like 5-1, that should be character, into dates, and stripping leading zeros that are part of things like account numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please describe the exact problems you have been having with importing CSV files. One important consideration is that Proc Import only examines 20 rows of data by default before setting variable properties. So use of setting a large value for the Guessingrows option often fixes many of the issues people encounter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 20:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688359#M24595</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-01T20:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688364#M24596</link>
      <description>Don't they provide the INPUT code for these files?&lt;BR /&gt;&lt;A href="https://www.cdc.gov/nchs/nhis/2019nhis.htm" target="_blank"&gt;https://www.cdc.gov/nchs/nhis/2019nhis.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Using that with the CSV should get you what you need...</description>
      <pubDate>Thu, 01 Oct 2020 20:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688364#M24596</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-01T20:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem importing excel sheet into SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688365#M24597</link>
      <description>I tried again with the csv file and it worked! I'm not sure what was happening with it the first time I tried, but I've got it now! Thanks everyone</description>
      <pubDate>Thu, 01 Oct 2020 20:52:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-importing-excel-sheet-into-SAS/m-p/688365#M24597</guid>
      <dc:creator>J-Ann</dc:creator>
      <dc:date>2020-10-01T20:52:52Z</dc:date>
    </item>
  </channel>
</rss>

