Import from Excel to Sql Table

喜欢而已 提交于 2020-01-14 05:36:06

问题


I have excel sheet and I have 5 columns all are of type VARCHAR's.

I have a Table called Details and has 5 columns all of type VARCHAR's.

I have to import the data from Excel to table every day.

I am manually copying the records from excel and pasting them into the sql table. This approach is easy and quick.

But I want to make it automated.

Can I do it through the coding by giving the location of Excel Sheet.

I am using SQL 2005 and Excel 2007.

Any suggestions or directions please.

Thank you.


回答1:


You can use Integration Services to import excel files automatically, here is a good example:

http://www.techrepublic.com/blog/datacenter/how-to-import-an-excel-file-into-sql-server-2005-using-integration-services/205

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.



来源:https://stackoverflow.com/questions/5103994/import-from-excel-to-sql-table

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!