Posted by: bobbhai April 5, 2015
Login in to Rate this Post:
0
?
how do i use connection string to excel to sql ..
// connection to sql
SqlConnection con = new SqlConnection("provideer=Microsoft.Ace.SqlDB.12.0; Data Source="+C:\Users\baburam\Desktop\GPS Excel.xlsx+";Extended propertities=Excel_Gridview 12.0; HDR=Yes");
SqlCommand cmd = new SqlCommand("select * from[Sheet1$]",con);
// connection to sql
SqlConnection con = new SqlConnection("provideer=Microsoft.Ace.SqlDB.12.0; Data Source="+C:\Users\baburam\Desktop\GPS Excel.xlsx+";Extended propertities=Excel_Gridview 12.0; HDR=Yes");
SqlCommand cmd = new SqlCommand("select * from[Sheet1$]",con);