This project has moved. For the latest updates, please go here.

How to delete an existing table?

Jun 20, 2011 at 5:17 AM

I need to "repopulate/resize" an existing table in an Excel 2007 spreadsheet...

I saw the discussion http://epplus.codeplex.com/discussions/253630 which discusses reusing tables, but I am not familiar with the advanced technique of modifying the table attributes using the TableXml feature...

It seems a simpler solution for me would be to just remove the table and recreated it, but table removal does not appear to be supported in 2.9.0.1 either, is there a way to do this using an advanced technique...

Is there any documentation on either of the above advanced techniques or can any provide some sample code showing how to do either?

Thanks in advance! 

Coordinator
Jun 22, 2011 at 7:36 PM

I haven't implemented a delete method for tables or resizing, but I guess i should.  The suggestion in the discussion is undocumented and I have not done it.

Jan 28, 2013 at 12:09 PM
Edited Jan 28, 2013 at 12:10 PM

Could you propose a brief guideline how this could be implemented? I assume that deleting should be done through the ExcelTableCollection and resizing could be implemented through Ref?

Mar 26, 2013 at 9:49 PM
any update on this ? it does not seem to be any other way to remove the existing worksheet table - I have noticed the Remove() method has been added to the Drawings collection in the latest update - could you please do same for worksheet.Tables ?