Question: how to import data from excel to sql server in c#?
Answer: OleDbConnection con = new OleDbConnection(connectionString); con. Open(); for (int i = 0; dt. Rows. Count > i; i++) { command = new SqlCommand("INSERT INTO WAHInvoice (UnitCode,CurrentMeterReading) } con. Close();