Unable to delete table using EPPlus
<p>I'm having an issue with a very basic thing. Deleting a table using EPPlus.
The problem that I'm facing is that from the code point of view (I've debugged the code, and in the <code>Worksheet.Tables</code> collection, the tabled that I called Delete on is gone. I proceed to save the excel and when I try to open it, Excel tells me that "they" found a problem with it, and if I want them to recover as much as possible. If I select Yes (because No closes the file) the table that I just delete through code is back again.</p>

<p>If I set the <code>ClearRange</code> property in the <code>Delete()</code> method to <code>true</code>, the table is still in the spreadsheet, but this time the header columns are gone, and instead Excel recreates my table with some default names (Column1, Column2, etc, depending on the number of columns the original table had).</p>

<p>I've tried to manipulate the <code>TableXml</code> property of the table, and it's still not working. Other than that, I've just read the Internet for about 3 hours with no apparent solution to my problem.</p>

<p>So, if anyone is wondering, the code for this is:</p>

<pre><code>using (var package = new ExcelPackage(fileToWriteTo, templateToStartWith))
    {
            var workbook = package.Workbook;
            var worksheet = workbook.Worksheets[WORKSHEET_NAME];
            worksheet.Tables.Delete("dynamicTable", true);
            //worksheet.Tables.Delete("dynamicTable");
            package.Save();
    }
</code></pre>

<p>As you can see, a very basic operation that kinda fails.
If anyone knows of a solution to remove a table from a spreadsheet with EPPlus, please share. Would be much appreciated.</p>