excel values become null [VS 2005]
Hi all, I'm trying to import my xls files to sql server, but i saw some values become null even though data in excel values are exist.
below is my connection string :
Code:
Dim cnstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & txtfName.Text & ";" & _
"Extended Properties =""Excel 8.0;HDR=YES;IMEX=1"""
i have searched many references about this topic, still no solution.
I changed the registry editor HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
and set the TypeGuessRows become "0", still not give impact to my application.
This error occurs while i'm importing the alphanumeric values into text, but previous values are numeric (but string datatyped).
Any help appreciated!!
THanks in advance
Re: excel values become null [VS 2005]
Those are correct settings so it reads all rows for its guess at the data types.
What version of Excel is the file? pre-2007 or 2007+?
Re: excel values become null [VS 2005]
the excel is pre 2007, but it doesnt work properly...i dont know why? i've searched many references about this, still i cant solve this problem..