Using OLEDB for uploading file with Excel 2016
<p>my application basically accepts an excel file and uploads data to my database which used to work perfect with Excel 2010 with the below code. However we update the system to Excel 2016 and it stopped working for some reason, could you please assist me in what updates I should make to my code please.</p>

<p>This is the current code to connect:</p>

<pre><code> openFileDialog1.ShowDialog();
            var fileName = string.Format(openFileDialog1.FileName);

            Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
            Microsoft.Office.Interop.Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(fileName, 1, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "", true, false, null, false);

var connectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileName + "; Extended Properties=Excel 12.0;", fileName);
</code></pre>