XWPFDocument fileWord = null;
fileWord = new XWPFDocument("要打开的word文件");
//获取到第一个表格
XWPFTable table = fileWord.Tables[0];
int tablesIndex = fileWord.GetPosOfTable(table);
fileWord.RemoveBodyElement(tablesIndex);
NPOI实现Word删除表格
最新推荐文章于 2023-04-14 16:12:09 发布