Results 1 to 2 of 2

Thread: Excel import van lange tekst via ADO

  1. #1
    Member
    Join Date
    Feb 2003
    Location
    Tilburg, of all places....
    Posts
    50

    Excel import van lange tekst via ADO

    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

  2. #2
    Goeie tip, maar je kunt 'm ook op 0 zetten. In dat geval wordt je hele file gescanned. Wel zo handig met imports, want hoe weet je zeker dat het met 100 rijen wél goed gaat?
    1+1=b

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •