Hi
What is the efficient way to upload excel data to sql database?
excel file consists of 4000 rows..so i need to save these records to sql database in web application,i know only by creating ODBC connection i.e
_path =
@Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq= + _path;
OdbcConnection _xlsConn = new OdbcConnection(_path);
_xlsConn.Open();
OdbcCommand _xlsSelSht = new OdbcCommand("Select " + columns + " FROM [" + _sheet + "$]", _xlsConn);
OdbcDataReader _xlsReader = _xlsSelSht.ExecuteReader();
while (_xlsReader.Read()){.....}
Is this is efficient way ? keeping in mind speed because huge data needs to upload...
thanks...
Comments