如何将数据从Excel文件转换为SQL Server?

问题描述:

您好,即时通讯正在使用SQL Server Management Studio Express,我想将数据从excel文件转换为SQL Server Management Studio Express.我能否知道您是否可以推荐所有可供下载的程序或任何编码?顺便说一句,我使用Visual Studio 2005并将数据库嵌入其中.

Hi, im using SQL Server Management Studio Express and i want to convert data from excel files to SQL Server Management Studio Express. May i know if there is any programs that you all can recommend for download or any codings to go along with? By the way im using Visual Studio 2005 and the database is embedded to it.

在sqlserver中使用批量更新(BCP UTIL)可以将数据存储在sql中从任何使用bcp的外部文件
use bulk update (BCP UTIL) in sqlserver.u can store the data in sql from any external file using bcp


注意,要使用bcp,您需要xp_cmdshell希望默认情况下处于关闭状态.

另外,我不确定bcp是否可以导入/导出Excel文件. .csv是,但不是.xls.

Express是否具有导入/导出向导?

我的建议是使用VS作为界面.

[5/7/2010]
由于Express没有向导使用.NET读取excel文件并将数据推送到SQL.
Note that to use bcp you need xp_cmdshell wish is turned off by default.

Also I am not sure that bcp can import/export an Excel file. A .csv yes but not a .xls.

Does Express have an import/export wizard?

My suggestion would be to use VS as the interface.

[5/7/2010]
Since Express does not have the wizard read the excel file with .NET and push the data to SQL.


是的,我使用VS作为界面.

该SQL Server Management Studio Express没有导入/导出向导.

我已经下载了一个名为XlsToSql的程序,但是仍然无法导入数据.
Yes, I''m using VS as my interface.

This SQL Server Management Studio Express does not have an import/export wizard.

I''ve downloaded a program called XlsToSql but data still can''t be imported.