ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Error: The Microsoft Jet database engine could not find the object when excel sheet name with number in ASP.Net<p>Hi <a class="username" rel="itsjayshah"> itsjayshah</a>;</p> <p>I have checked. There is no problem with number.</p> <p>The problem is when there is only number then the select query generates like <strong>SELECT * From ['9286$'A1:B4] </strong>which is not valid and the <strong>'</strong> must be replaced.</p> <p>Refer the below sample.</p> <p><span style="text-decoration: underline;">C#</span></p> <pre class="brush: csharp">private DataTable ImportExcel(String strFilePath) { DataSet ds = new DataSet(); //if (!File.Exists(strFilePath)) return false; String strExcelConn = &#34;Provider=Microsoft.Jet.OLEDB.4.0; Data Source=&#34; + strFilePath + &#34;; Extended Properties=&#39;Excel 8.0;HDR=Yes&#39;&#34;; OleDbConnection connExcel = new OleDbConnection(strExcelConn); OleDbCommand cmdExcel = new OleDbCommand(); try { cmdExcel.Connection = connExcel; //Check if the Sheet Exists connExcel.Open(); DataTable dtExcelSchema; //Get the Schema of the WorkBook dtExcelSchema = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); connExcel.Close(); //Read Data from Sheet1 connExcel.Open(); OleDbDataAdapter da = new OleDbDataAdapter(); string SheetName = dtExcelSchema.Rows[0][&#34;TABLE_NAME&#34;].ToString(); //cmdExcel.CommandText = &#34;SELECT * From [&#34; + SheetName + &#34;]&#34;; //Range Query string query = &#34;SELECT * From [&#34; + SheetName + &#34;A1:B4]&#34;; query = query.Replace(&#34;&#39;&#34;, &#34;&#34;); cmdExcel.CommandText = query; da.SelectCommand = cmdExcel; da.Fill(ds); connExcel.Close(); } catch (Exception ex) { Response.Write(ex.Message); } finally { cmdExcel.Dispose(); connExcel.Dispose(); } return ds.Tables[0]; }</pre> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/169953/Error-The-Microsoft-Jet-database-engine-could-not-find-the-object-when-excel-sheet-name-with-number-in-ASPNet/https://www.aspforums.net:443/Threads/169953/Error-The-Microsoft-Jet-database-engine-could-not-find-the-object-when-excel-sheet-name-with-number-in-ASPNet/Thu, 28 Sep 2017 06:15:52 GMTError: The Microsoft Jet database engine could not find the object when excel sheet name with number in ASP.Net<p>No value given for one or more required parameters.</p>https://www.aspforums.net:443/Threads/169953/Error-The-Microsoft-Jet-database-engine-could-not-find-the-object-when-excel-sheet-name-with-number-in-ASPNet/https://www.aspforums.net:443/Threads/169953/Error-The-Microsoft-Jet-database-engine-could-not-find-the-object-when-excel-sheet-name-with-number-in-ASPNet/Thu, 28 Sep 2017 06:31:30 GMT