构造方法:
XWPFDocument()
XWPFDocument(java.io.InputStream is)
读入一个输入流
XWPFDocument(OPCPackage pkg)
使用`OPCPackage`对象中的数据来解析和构建一个新的`XWPFDocument`对象。
其他方法:
public addEndnote(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn note)向文档添加尾注 public boolean removeBodyElement(int pos) document.removeBodyElement是用于从XWPFDocument对象中移除指定的IBodyElement元素的方法。可以删除文档中的段落、表格等。 public void setParagraph(XWPFParagraph paragraph,int pos) 将一个段落的内容复制到列表段落中第pos位的现有段落中 public XWPFParagraph getLastParagraph() 得到最后一个段落 public XWPFTable createTable()创建一个默认一行一列的空表 public XWPFTable createTable(int rows,int cols)指定创建表格的行数和列数 rows行数 cols列数public void setTable(int pos,XWPFTable table) 将位于位置pos的数组表中的表内容替换为table public boolean isEnforcedReadonlyProtection()是否只读强制保护public boolean isEnforcedTrackedChangesProtection()是否强制跟踪保护public boolean isEnforcedProtection()文档是否被强制保护 public boolean isEnforcedFillingFormsProtection()文档是否强制表单保护isEnforcedCommentsProtection()是否强制选择注释保护 public void enforceReadonlyProtection()强制只读保护
待续...