i have a excel file and i have to read some column from excel and fill in my gridview. can anyone know how to do please help me.
piyush kumar
OleDbconnection cn; OleDataAdapter cmd; DataSet ds; cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source= C:\blablabla.xls; Extended properties = Excel 8.0;"); cmd = new OledbDataAdapter(Select * From [Sheet 1$A1:B10],cn); cn.Open(); cmd.Fill(ds); cn.close(); this sample selects range A1/B10 from Sheet1