XWPFDocument document=new XWPFDocument ();
CTDocument1 doc=document. GetDocument ();
CTBody body=doc. GetBody ();
if (! Body. The isSetSectPr ()) {
Body. AddNewSectPr ();
}
CTSectPr section=body. GetSectPr ();
CTColumns columns=section. GetCols ();
The columns. SetNum (BigInteger. The valueOf (2));//document columns, column 2
CodePudding user response:
Hello:
Your this column code CTColumns columns=section. GetCols (); This line without error?
Which version do you use? A: what's all dependent jar package?
One of my project, also need to export the word columns, but CTColumns columns=section. GetCols (); This line of code error,
The import org. Openxmlformats. Schemas. Wordprocessingml. X2006. Main. CTColumns;
Thank you very much!
CodePudding user response: