Load Counter
motorcycle helmets

Sunday 10 November 2013

How to Import data from excel sheet to Access Database using DataGridView control in C#.

In this article, how data can be transferred from excel sheet to a table of Access Database through DataGridView using OleDB database connectivity in C#, is revealed with simple source code. It is complete apps in which you can import data from a particular formatted excel sheet and insert into a table of Access Database with eliminating duplicate data.


To transfer data from one format (system/file) to another format (system/file) is a common and essential task for a software developer. Here I have explained elaborately with very simple code snippet and developed three functions in C# which are the heart of this apps. Firstly, GetExcel() function is called to load data into DataGridView from excel sheet, InsertData() function work to save data into Access Database from DataGridView and third function name is CheckDuplicate() which play role to check the duplicate data.
Excel File Importer

 

No comments: