Help me guys i want to import Excel file and displayed in GridView
here is my code
string strConnection = "Server = DESKTOP-VCJ5I4I; Database =Facturation; Integrated Security = true";
string excelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + TextBox1.Text + ";Extended Properties=Excel 12.0;Persist Security Info=False";
OleDbConnection excelConnection = new OleDbConnection(excelConnectionString);
DataSet ds;
OleDbCommand cmd = new OleDbCommand("Select * from [fact$]", excelConnection);
DataTable d = new DataTable();
d.SelectCommand = cmd;
da.Fill(ds, "Fact");
GridView.DataSource = ds.Tables("Fact");