Is their an issue with importing Excel files with null rows into SQLServer 2005 tables -
i using openrowset()
function import excel file temporary sqlserver 2005 table.
it works fine in cases. if first 10 rows of excel file null, remaining non-null rows imported null.
has encountered issue previously? thoughts on how overcome it?
this caused how oledb driver determines datatypes in excel. default scans first 8 rows determine datatype of fields.
- you used able set "maxscanrows" in connection string configure rows scan in worksheet. setting unfortunately not work anymore since jet 4.0. way force set th registry key [hklm\software\microsoft\jet\4.0\engines\excel\typeguessrows]. possible values 1-16 or 0 scan whole file.
- there imex setting (which means importmixedtypes) when set 1 means "importmixedtypes=text". solves lot of issues driver determines datatype based on amount of values in type finds.
Comments
Post a Comment