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


Abhijeet JadhavRank #349 · 7.2K reputationPosted Sep 26, 2019, 3:51 AM EDT
- 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.Sonu GuptaRank #1,261 · 1.4K reputationPosted Sep 29, 2019, 3:48 AM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 11, 2019, 5:57 PM EST
Leon DRank #851 · 2.6K reputationPosted Nov 11, 2019, 7:28 PM EST