如何使用C#在SQL TABALE中导入EXCEL文件 [英] how to IMPORT EXCEL FILE IN SQL TABALE USING C#

查看:99
本文介绍了如何使用C#在SQL TABALE中导入EXCEL文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正面临sql DATABASE TABALE中excel文件导入数据的问题。

请给我一些有关C#代码和示例的有用指导

Hi i am facing the problem of data of excel file import in sql DATABASE TABALE .
please give me valuable guidance with C# code & Example

推荐答案

这个方法效果很好,

根据你自己定制:



将数据从Excel导入到SQL Server [ ^ ]
this method work well,
customised this according to you:

Import Data from Excel to SQL Server[^]


SQL从Excel导入数据 [ ^ ]

如何将MS Excel数据导入SQL使用c#.net的服务器表 [ ^ ]

使用c#?? 将Excel文件导入ASP.NET中的SQL Server 2005 [ ^ ]

如何将excel文件导入asp.net中的网格视图使用c#并将网格视图保存到数据库sql server 2005 [ ^ ]

使用TSQL脚本从Excel或Access将数据导入SQL Server [ ^ ]

在SQL Server中读取Excel文件 [ ^ ]
SQL Import Data from Excel[^]
How to import MS Excel data to SQL Server table using c#.net[^]
Import Excel File into SQL server 2005 in ASP.NET using c# ??[^]
How to import excel file to grid view in asp.net using c# AND save grid view to database sql server 2005[^]
Import Data to SQL Server from Excel or Access using TSQL Script[^]
Reading Excel file in SQL Server[^]


你有几个可能性:

1)仅使用sql server工具: http://support.microsoft.com/kb / 321686 [ ^ ]

2)在客户端使用数据访问:导入在ASP中使用C#从excel到SQL服务器的数据。 NET [ ^ ]。

对此有一些评论:

- 它不仅适用于asp.net

- 不要使用字符串连接来生成dml语句,使用参数化命令 [ ^ ]或EntityFramework

3)批量复制: http://technico.qnownow.com/bulk-copy-data-from-excel -to-destination-db-using-sql-bulk-copy / [ ^ ]

4)Interop: http://dontbreakthebuild.com/2011/01/30 / excel-and-c-interop-with-net-4-how-to-read-data-from-excel / [ ^ ],更快MS Excel使用Office互操作程序集读取 [ ^ ]
You have several possibilities:
1) using just the sql server facilities: http://support.microsoft.com/kb/321686[^]
2) Using data access on client side: Import Data from excel to SQL server using C# in ASP. NET[^].
Some remarks on this:
- it is not only for asp.net
- don''t use string concatenation for dml statement generation, use parameterized command[^] instead or EntityFramework
3) Bulk copy: http://technico.qnownow.com/bulk-copy-data-from-excel-to-destination-db-using-sql-bulk-copy/[^]
4) Interop: http://dontbreakthebuild.com/2011/01/30/excel-and-c-interop-with-net-4-how-to-read-data-from-excel/[^], Faster MS Excel Reading using Office Interop Assemblies[^]


这篇关于如何使用C#在SQL TABALE中导入EXCEL文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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