Showing posts with label binh. Show all posts
Showing posts with label binh. Show all posts

Monday, March 12, 2012

Import Data from excel file into Sql server 2005?

Hi all,

I try to import data from excel file, my excel file have column called Name, the value of this column is text: ex: Binh Chanh, 1,2,3,4,5.....When i import into sqlserver 2005, these rows which have value 1,2,3,4,5 (number) , now have Null value in SQL server 2005.

How can i fix this error?

Thanks,

Do you use the IMEX=1 switch in the Excel connection string?

(like:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source= <your_file_name> ;Extended Properties="EXCEL 8.0;HDR=YES;IMEX=1";

)

It did the trick for me, although my problem was the other way around: numbers were correct, text was NULL values.

So I'm not sure whether it will work for you.

Pipo