A23, We load excel files into SQL every month, but I convert them to a comma delimited format (CSV), rename them to a filetype of .TXT (otherwise it still thinks it is excel). Then I have a .FMT file that outlines all of the fields:
6.0
1
1 SYBCHAR 0 4 "," 1 ARCHIVE_YEAR
and then I use a bulk copy command (requires bcp.exe) from dos (can be set up in a batch exec also):
bcp dbname..dbtable in MYEXCEL.TXT -f formatfilename.FMT -U userid -P password -S servernm
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.