Sunday, November 4, 2007

Excel in .Net

Excel sheets can be uploaded into the Database using Excel DSN in .Net.

This can be implemented using Excel DSN.

1. Create connection string using OLE provider to get the data from Excel.
Add the following along with that.
extended properties = true;

2. Now your entire excel is converted to Dataset.

This is the simplest way to contact with the Excel. This copies the entire set of records into the DataSet in the same order.

This helps to bulk upload from Excel to Database.