title: How will I open xlsx File in C#.NET?
body: <p>I want to open xlsx File in C#.NET, but it shows error .</p>
  
  <p>But if the file is xls extension then easily i can open it but when file format is xlsx then shows error.</p>
  
  <p>My code is </p>
  
  <pre><code>oXL.Workbooks.Open(Path, 0, false, 5, "", "", false,
                 //Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0)
  </code></pre>
  
  <p>The exception is:</p>
  
  <blockquote>
    <p>Excel cannot open the file 'New Microsoft Excel Worksheet.xlsx'
    because the file format or file extension is not valid. Verify that
    the file has not been corrupted and that the file extension matches
    the format of the file.</p>
  </blockquote>