<?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: WARNING: Failed to scan text length with Excel libname in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312414#M67772</link>
    <description>&lt;P&gt;Do want to correct the data to suppress the message or just not show the message?&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2016 18:15:04 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-11-17T18:15:04Z</dc:date>
    <item>
      <title>WARNING: Failed to scan text length with Excel libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312359#M67744</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I keep getting this warning&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WARNING: Failed to scan text length or time type for column xxx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the Excel libname and reading the file with the data step. &amp;nbsp;I have already checked the registry and&amp;nbsp;&lt;STRONG&gt;TypeGuessRows=0.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I read the same file repeatedly and get this message for the same column every time. &amp;nbsp;I tried forcing a length:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;set ln."Tabname$"n (dbsastype = (xxx= 'char(500)'));&lt;/P&gt;
&lt;P&gt;but that doesn't work. &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's no problem with the data. &amp;nbsp;I just don't want to see this message in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;V9.2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone have any suggestions? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 15:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312359#M67744</guid>
      <dc:creator>evp000</dc:creator>
      <dc:date>2016-11-17T15:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Failed to scan text length with Excel libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312363#M67746</link>
      <description>&lt;P&gt;Sounds like you have some garbage in your Excel file. &amp;nbsp;Not surprising, Excel really shouldn't be used for any data purpose. &amp;nbsp;A Google found this discussion, you could try some of the options therein:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://groups.google.com/forum/#!topic/comp.soft-sys.sas/Tcg6V7Sj8vk" target="_blank"&gt;https://groups.google.com/forum/#!topic/comp.soft-sys.sas/Tcg6V7Sj8vk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not much we can really do, are not able to recreat your issue, and I wouldn't download Excel files myself anyways.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 15:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312363#M67746</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-17T15:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Failed to scan text length with Excel libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312413#M67771</link>
      <description>&lt;P&gt;Thanks, that was helpful. &amp;nbsp;If I set&amp;nbsp;scan_text to 'no' then specify the lengths myself, it works but I don't want to set the lengths myself for the rest of the sheets. &amp;nbsp;It means I have to have one libname with scan_text=no, used for this one sheet, and another with scan_text=yes for the rest of the sheets, even though it's the same excel file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So with scan_text=no I could&lt;/P&gt;
&lt;P&gt;a) specify the lengths with a length statement, in which case&amp;nbsp;I had to set&amp;nbsp;option VARLENCHK = NOWARN for this step since the lengths were&amp;nbsp;conflicting with the default lengths SAS wanted to assign. &amp;nbsp;And get rid of the informats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b) set the lengths with&amp;nbsp;(DBSASTYPE=...). &amp;nbsp;It took me a while since, when specifying the source column from Excel, you have to use "Column Name"n &amp;nbsp;&amp;lt;- n for the original name with spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 18:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312413#M67771</guid>
      <dc:creator>evp000</dc:creator>
      <dc:date>2016-11-17T18:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Failed to scan text length with Excel libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312414#M67772</link>
      <description>&lt;P&gt;Do want to correct the data to suppress the message or just not show the message?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 18:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312414#M67772</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-17T18:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: WARNING: Failed to scan text length with Excel libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312418#M67774</link>
      <description>&lt;P&gt;The data is ok, in fact, I don't even use that column. &amp;nbsp;I just don't want the message. Could I delete that one variable at source, in the set statement? &amp;nbsp;How? &amp;nbsp;With the Excel column name?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;set specns."Sheetname$"n &amp;nbsp;;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 18:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WARNING-Failed-to-scan-text-length-with-Excel-libname/m-p/312418#M67774</guid>
      <dc:creator>evp000</dc:creator>
      <dc:date>2016-11-17T18:25:32Z</dc:date>
    </item>
  </channel>
</rss>

