从Excel导入到SQL表 [英] Import from Excel to Sql Table
问题描述
我有Excel工作表,我有5列的所有都是VARCHAR类型的。
I have excel sheet and I have 5 columns all are of type VARCHAR's.
我有一个名为详细信息表,并有5列所有VARCHAR类型的。
I have a Table called Details and has 5 columns all of type VARCHAR's.
我必须从Excel表,每天导入数据。
I have to import the data from Excel to table every day.
我是手动复制从Excel记录并粘贴到SQL表。这种方法简单快捷。
I am manually copying the records from excel and pasting them into the sql table. This approach is easy and quick.
但我想使它自动化。
我可以通过给Excel工作表的位置,做到这一点通过编码。
Can I do it through the coding by giving the location of Excel Sheet.
我使用的SQL 2005和Excel 2007。
I am using SQL 2005 and Excel 2007.
任何建议或指示,请。
感谢你。
推荐答案
可以使用集成服务导入Excel文件自动,这里是一个很好的例子:
You can use Integration Services to import excel files automatically, here is a good example:
<一个href="http://www.techrepublic.com/blog/datacenter/how-to-import-an-excel-file-into-sql-server-2005-using-integration-services/205" rel="nofollow">http://www.techrepublic.com/blog/datacenter/how-to-import-an-excel-file-into-sql-server-2005-using-integration-services/205
您还可以使用导入/导出向导的SQL Server 2005为好,这做同样的工作,也让你将其保存为SSIS包中。
You can also use Import/Export Wizard within SQL Server 2005 as well, which does the same job and also allow you to save it as a SSIS package.
这篇关于从Excel导入到SQL表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!