如何将数据从excel导入到sql [英] How to Import data from excel to sql

查看:140
本文介绍了如何将数据从excel导入到sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我将数据从excel导入到sql。

我使用以下连接字符串: -



excelconnectionstring = @Provider = Microsoft.ACE.OLEDB.12.0; Data Source =+ filepath +; Extended Properties ='Excel 8.0; HDR = {1}' ;



在excel中,一个coloum数据采用以下形式: -

WB / 7225 / X-123433



问题是,当我从excel获取数据到datatable时,所有数据都在数据表中,除了上面的表格..请告诉我如何纠正问题..

Hello,

I am importing data from excel to sql.
I am using the following connection string:-

excelconnectionstring = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filepath + ";Extended Properties='Excel 8.0;HDR={1}'";

And in excel one coloum-data is in following form:-
WB/7225/X-123433

The problem is,when iam getting the data from excel to datatable,all data are coming in the datatable except the above form..please, tell me how can i correct the issue..

推荐答案

访问以下链接。希望其中一人可以帮助你。



http://cleancode4devs.blogspot.in/2012/01/import-data-from-excel-to-sqlserver.html [ ^ ]

< a href =http://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/> http://www.mssqltips.com/sqlservertutorial/203/简单导入数据到sql-server / [ ^ ]

将数据从Excel导入到SQL Server [ ^ ]
Visit below links. Hope one of them may help you.

http://cleancode4devs.blogspot.in/2012/01/import-data-from-excel-to-sqlserver.html[^]
http://www.mssqltips.com/sqlservertutorial/203/simple-way-to-import-data-into-sql-server/[^]
Import Data from Excel to SQL Server[^]


这篇关于如何将数据从excel导入到sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆