You can read the excel file and display data in datagrid
Also you can update using datagrid approach
put in your .aspx.cs file:
------------------------------------
protected void btnImportExcelFile_Click(object sender, EventArgs e)
{
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=C:\\exceltest.xls;" +
"Extended Properties=Excel 8.0;";
//You must use the $ after the object you reference in the spreadsheet
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Tabelle1$]", strConn);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "ExcelInfo");
DataGrid1.DataSource = myDataSet.Tables["ExcelInfo"].DefaultView;
DataGrid1.DataBind();
}
put in your .aspx file:
------------------------------------
<asp:Button ID="btnImportExcelFile" runat="server" OnClick="btnImportExcelFile_Click"
Text="Import Excel File" /></div><br />
<asp:DataGrid id=DataGrid1 runat="server"/>
You can use DataReader also for display of data