Home > Back-end >  Poi how to set the word display column separation of on-line?
Poi how to set the word display column separation of on-line?

Time:10-27

Bar code:
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:

reference 1st floor lzn970621 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!


Org. Apache. Poi
Ooxml - schemas
1.4 & lt;/version>

With this depend on the package
  • Related