i try to upload excel file using asp.net and reading all the datas and displaying in gridview but am facing below mentioned error kindly help me out .
System.Data.OleDb.OleDbException(0x80040E37): The Microsoft Access database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly. If 'Sheet1$' is not a local object, check your network connection or contact the server administrator.at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResulthr)at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMSdbParams, Object& executeResult)at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)at System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehaviorbehavior)at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)at testhd.WebForm5.Button1_Click(Object sender, EventArgs e) in E:\host app - Copy\New folder (3) - Copy\New folder (2)\ncs\ncs2\Addbom.aspx.cs:line 184

Leon DPosted Nov 12, 2019, 12:28 AM
Mageshwaran RPosted Nov 11, 2019, 10:57 PM
Sonu GuptaPosted Sep 29, 2019, 7:48 AM
Abhijeet JadhavPosted Sep 26, 2019, 7:51 AM
- Save the excel file on the server.
- Use that path in your code to browse through the excel, you can save the path in web.config and use it.
Do let me know if the issue is not resolved.