Is it necessary to keep open a excel file, while importing data to data table, C#
<p><strong>My connection string is:</strong></p>

<pre><code>String excelConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("abc.xls") + ";Extended Properties='Excel 8.0; HDR=YES;IMEX=1'";

OleDbConnection conn = new OleDbConnection(excelConn);  
Conn.Open();
</code></pre>

<p>It gives an error, like “<strong>Could not decrypt file.</strong>” If my Excel file (abc.xls) is close in my client PC. But it is ok when my excel file is open.</p>
