<?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 PROC IMPORT from Excel truncating text field at 255 chars in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-from-Excel-truncating-text-field-at-255-chars/m-p/35409#M8732</link>
    <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to read in a sheet from an Excel file and it is truncating one of the text columns to 255 characters.  This is despite having TEXTSIZE set to 1000 and SCANTEXT = YES.  The system returns the following warning:&lt;BR /&gt;
&lt;BR /&gt;
WARNING: Failed to scan text length or time type for column Survey Question for Tables.&lt;BR /&gt;
&lt;BR /&gt;
Here is the code: &lt;BR /&gt;
&lt;BR /&gt;
proc import datafile="\\devdata\e\HYS\Dropdowns - &amp;amp;DropDownVersion..xls"&lt;BR /&gt;
   out=crosswalk_master&lt;BR /&gt;
   dbms = excel&lt;BR /&gt;
   replace;&lt;BR /&gt;
   MIXED = no;&lt;BR /&gt;
   sheet = 'Master';&lt;BR /&gt;
   TEXTSIZE=1000;&lt;BR /&gt;
   SCANTEXT=YES;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Has anybody seen this, or better yet figured out out to get arround it short of exporting the sheet to a CVS file or a similar manual step?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Curtis</description>
    <pubDate>Tue, 22 Mar 2011 17:05:24 GMT</pubDate>
    <dc:creator>CurtisMack</dc:creator>
    <dc:date>2011-03-22T17:05:24Z</dc:date>
    <item>
      <title>PROC IMPORT from Excel truncating text field at 255 chars</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-from-Excel-truncating-text-field-at-255-chars/m-p/35409#M8732</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to read in a sheet from an Excel file and it is truncating one of the text columns to 255 characters.  This is despite having TEXTSIZE set to 1000 and SCANTEXT = YES.  The system returns the following warning:&lt;BR /&gt;
&lt;BR /&gt;
WARNING: Failed to scan text length or time type for column Survey Question for Tables.&lt;BR /&gt;
&lt;BR /&gt;
Here is the code: &lt;BR /&gt;
&lt;BR /&gt;
proc import datafile="\\devdata\e\HYS\Dropdowns - &amp;amp;DropDownVersion..xls"&lt;BR /&gt;
   out=crosswalk_master&lt;BR /&gt;
   dbms = excel&lt;BR /&gt;
   replace;&lt;BR /&gt;
   MIXED = no;&lt;BR /&gt;
   sheet = 'Master';&lt;BR /&gt;
   TEXTSIZE=1000;&lt;BR /&gt;
   SCANTEXT=YES;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Has anybody seen this, or better yet figured out out to get arround it short of exporting the sheet to a CVS file or a similar manual step?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Curtis</description>
      <pubDate>Tue, 22 Mar 2011 17:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-from-Excel-truncating-text-field-at-255-chars/m-p/35409#M8732</guid>
      <dc:creator>CurtisMack</dc:creator>
      <dc:date>2011-03-22T17:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT from Excel truncating text field at 255 chars</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-from-Excel-truncating-text-field-at-255-chars/m-p/35410#M8733</link>
      <description>Well, I contacted SAS tech support and they had a solution which I will share for posterity.&lt;BR /&gt;
&lt;BR /&gt;
It takes changing a couple of registry settings.  Which ones depends on your OS, Version of Office, and version of SAS.  For my Windows 7 64bit machine with Office 2007 and SAS 9.2, the TypeGuessRows value needed to be changed from 8 to 0.&lt;BR /&gt;
&lt;BR /&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Excel&lt;BR /&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\12.0\Access Connectivity Engine\Engines\Excel&lt;BR /&gt;
&lt;BR /&gt;
Tech support sent me the following.  Note, that on my machine, the Jet key was in a different location.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;&lt;BR /&gt;
Or to make this simpler you can follow these instructions here.&lt;BR /&gt;
&lt;BR /&gt;
1. You bring up the registry edit by typing REGEDIT from a start +&amp;gt; run windows prompt.&lt;BR /&gt;
2. Expand HKEY_LOCAL_MACHINE by clicking on the plus + sign on the left&lt;BR /&gt;
3. Expand SOFTWARE&lt;BR /&gt;
4. Expand MICROSOFT&lt;BR /&gt;
5. Expand JET&lt;BR /&gt;
6. Expand 4.0&lt;BR /&gt;
7. Expand Engines&lt;BR /&gt;
8. Expand Excel&lt;BR /&gt;
9. Double click on the TypeGuessRows on the right. &lt;BR /&gt;
10. Change the value from 8 to 0.&lt;BR /&gt;
&lt;BR /&gt;
Then exit and you are done. &lt;BR /&gt;
&lt;BR /&gt;
If you are running 9.2 TS2M0 or later you should change this one or these keys as well depending&lt;BR /&gt;
on the microsoft office you have installed . &lt;BR /&gt;
&lt;BR /&gt;
To change the registry key for office 2007:&lt;BR /&gt;
&lt;BR /&gt;
In Windows environments, select Start =&amp;gt; Run and type REGEDIT to display the Registry Editor. &lt;BR /&gt;
In the registry tree,&lt;BR /&gt;
select HKEY_LOCAL_MACHINE =&amp;gt; Software =&amp;gt; Microsoft =&amp;gt; Office =&amp;gt; 12.0 =&amp;gt; Access Connectivity Engine =&amp;gt;  Engines. &lt;BR /&gt;
Double-click the Excel node. &lt;BR /&gt;
In the right panel, double-click the TypeGuessRows entry. &lt;BR /&gt;
Change the value data from 8 to 0. &lt;BR /&gt;
Click OK. &lt;BR /&gt;
Select File =&amp;gt; Exit to exit the Registry Editor window. &lt;BR /&gt;
&lt;BR /&gt;
If you are running 9.2 TS2M0 or later and have Office 2010 installed  you should change this one instead. &lt;BR /&gt;
&lt;BR /&gt;
To change the registry key:&lt;BR /&gt;
&lt;BR /&gt;
In Windows environments, select Start =&amp;gt; Run and type REGEDIT to display the Registry Editor. &lt;BR /&gt;
In the registry tree,&lt;BR /&gt;
select HKEY_LOCAL_MACHINE =&amp;gt; Software =&amp;gt; Microsoft =&amp;gt; Office =&amp;gt; 14.0 =&amp;gt; Access Connectivity Engine =&amp;gt;  Engines. &lt;BR /&gt;
Double-click the Excel node. &lt;BR /&gt;
In the right panel, double-click the TypeGuessRows entry. &lt;BR /&gt;
Change the value data from 8 to 0. &lt;BR /&gt;
Click OK. &lt;BR /&gt;
Select File =&amp;gt; Exit to exit the Registry Editor window. &lt;BR /&gt;
&lt;BR /&gt;
If you are running on a Windows 7 or X64 system you need to go a slight different registry key located here....&lt;BR /&gt;
&lt;BR /&gt;
for office 2007 change the key below:&lt;BR /&gt;
&lt;BR /&gt;
HKEY_LOCAL_MACHINE =&amp;gt; Software =&amp;gt; Wow6432Node =&amp;gt; Microsoft =&amp;gt; Office =&amp;gt; 12.0 =&amp;gt; Access Connectivity Engine =&amp;gt;  Engines&lt;BR /&gt;
&lt;BR /&gt;
For Office 2010 change the key below:&lt;BR /&gt;
&lt;BR /&gt;
HKEY_LOCAL_MACHINE =&amp;gt; Software =&amp;gt; Wow6432Node =&amp;gt; Microsoft =&amp;gt; Office =&amp;gt; 14.0 =&amp;gt; Access Connectivity Engine =&amp;gt;  Engines&lt;/B&gt;

Message was edited by: Curtis Mack</description>
      <pubDate>Tue, 22 Mar 2011 19:39:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-from-Excel-truncating-text-field-at-255-chars/m-p/35410#M8733</guid>
      <dc:creator>CurtisMack</dc:creator>
      <dc:date>2011-03-22T19:39:16Z</dc:date>
    </item>
  </channel>
</rss>

