Hallo,
Indien je excel kolommen moet inlezen die lange teksten bevatten, is deze registry setting handig:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Excel\TypeGuessRows
staat standaard op 8, maar ik heb hem op 100 gezet.
(ja ik weet het, is al een wat oudere Jet)
Dit is het aantal regels dat de Jet driver inleest om het type te bepalen, string of memo.
In geval van string wordt de tekst afgekapt op 255 chars, bij memo niet.
MSDN:
http://msdn.microsoft.com/en-us/library/ms141683.aspx
Truncated text. When the driver determines that an Excel column contains text data, the driver selects the data type (string or memo) based on the longest value that it samples. If the driver does not discover any values longer than 255 characters in the rows that it samples, it treats the column as a 255-character string column instead of a memo column. Therefore, values longer than 255 characters may be truncated. To import data from a memo column without truncation, you must make sure that the memo column in at least one of the sampled rows contains a value longer than 255 characters, or you must increase the number of rows sampled by the driver to include such a row. You can increase the number of rows sampled by increasing the value of TypeGuessRows under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engi nes\Excel registry key. For more information, see PRB: Transfer of Data from Jet 4.0 OLEDB Source Fails w/ Error.
Marc
Bookmarks