I am reading an excel sheet using the ACE provider and certain cells contain data greater than 255 bytes. I tried changing the TypeGuessRows in the registry settings as well as
I am also using Microsoft.ACE.OLEDB.12.0
on 64-bit Windows 7.
I found that the TypeGuessRows
in the connection string has no effect.
But increasing the TypeGuessRows
in the following registry location works:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\12.0\Access Connectivity Engine\Engines\Excel
More info on a similar bug (although you may already know this as you're already trying to change TypeGuessRows)
The problem is that the ACE driver is inferring a TEXT data type for the column you're populating the data set from. Text columns are limited to 255 characters. You need to force it to use the MEMO data type.
Your best bet for that is to garantee that the majority of the first eight rows in that column exceed 255 characters in length.
Source
This behavior is determined by the the predictive nature of the Excel driver/provider. Since it doesn't know what the data types are, it has to make a guess based upon the data in the first several rows. If the contents of a field exceeds 255 characters, and it's in the first several rows, then the data type will be Memo, otherwise it will probably be Text (which will result in the truncation).
The solution to this was extremely simple. Just change the format of the column containing this huge data to "Text" from "General" in the excel sheet.
Now I feel like a n00b.
refer this link. I think this is the problem (try with Memo fields)
http://allenbrowne.com/ser-63.html
In Access tables, Text fields are limited to 255 characters,but Memo fields can handle 64,000 characters (about 8 pages of single-spaced text)
Nice workaround: have a look at this stack answer
Excel has some limits.
Excel specifications and limits - 2013
As you can see in the link posted:
Feature Maximum Limit Column width 255 characters