title: Read Excel worksheet into DataTable using ClosedXML
body: <p>I would like to read the contents of an Excel worksheet into a C# DataTable. The Excel worksheet could have a variable numbers of columns and rows. The first row in the Excel worksheet will always contain the column names but other rows may be blank.</p>
  
  <p>All of the suggestions I have seen here in SO all assume the presence of <code>Microsoft.ACE.OLEDB</code>. I do not have this library installed on my system as when I try some of these solutions I get this error.</p>
  
  <pre><code>Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
  </code></pre>
  
  <p>Strange considering I have Office 2016 installed.</p>
  
  <p>For this reason I was hoping to use the ClosedXML library via Nuget but I do not see any examples in their wiki of reading an Excel worksheet to a DataTable in C#.</p>