如何把电子表格EXCEL中的数据改到SQL数据库中。

解决方案 »

  1.   

    OleDb方式或调用Excel.Application论坛上搜索一下,有很多的
      

  2.   

    http://support.microsoft.com/default.aspx?scid=kb;zh-cn;295646
      

  3.   

    http://singlepine.cnblogs.com/articles/264172.html
      

  4.   

    '建立excel连接
       set excelconn=server.createobject("adodb.connection")
       strAddr = Server.MapPath(uploadpath&filename)
       '输出源文件名
       Response.Write "源文件:"&strAddr&"<BR>"
       excelconn.open "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Excel 8.0;Data Source=" & strAddr
      
       '建立excel记录集
       set excelrs=server.createobject("adodb.recordset")   sql="select * from [Sheet1$]"
       excelrs.open sql,excelconn,1,1   ............   excelrs.close()    
       set excelrs=nothing  
       excelconn.Close()
       set excelconn=nothing
      

  5.   

    我是准备作个客户端上传页面,用户选择Excel文件,然后把excel的数据导入到服务器的sql中
      

  6.   

    使用SQL server 的导入,导出工具,如果编程用的话,使用bcp语句。我壹千用过,还不错
    ,请参见T-SQL帮助。下面是从文本导入的例子:
    EXEC master..xp_cmdshell 'bcp "TEMP.dbo.EWSD" in "c:\EWSD.txt" -c -q -U"sa" -P""'