Import Data From MS Excel to DataSet without using COM Objects
In my last blog I demonstrated how to export data from a DataSet/DataTable to MS Excel file. In this blog I will show you the process reversed - import data from excel to a Dataset without using the COM objects.Now let's start with an code example.Code ExamplePublic Class DataImporterPublic Shared Function ImportExcelToDataSet(ByVal excelFullFileName As String, ByVal targetTable As String) As DataSetDim oledbConnection As OleDbConnection = GetOledbConnection(excelFullFileName)Dim commandText As
Export a DataSet to Microsoft Excel without using the COM objects
It is a routine job to export data from MS SQL Server database to MS Excel, or import data from MS Excel to MS SQL Server database. There are lot of solutions based on MS Excel COM object, which make youe application depends on MS Excel, and you must install MS Excel application on you web application server. This kind of solutions are discouraged for the following reasons.For security reason, your customer maybe would not like to install Excel application on the web application server.The Excel