From your comment, I guess you are able to access the table
object but it's not direct child ot the sdtblock
, so you can't remove it with ccWithTable.RemoveChild()
method (yes, it supposes the item to remove is part of direct children of this element).
But if you can access the table object (that is a sub chilld), no need to know its parent.
Just call the OpenXmlElement.Remove()
method: it will remove the element from its parent.
theTable.Remove();