- Code: Select all
Tc tcTAF = factory.createTc();
TcPr sample = new TcPr();
TcBorders tcb = factory.createTcPrInnerTcBorders();
CTBorder ctb = factory.createCTBorder();
STBorder stb = STBorder.SINGLE;
ctb.setVal(stb);
tcb.setBottom(ctb);
tcb.setRight(ctb);
tcb.setLeft(ctb);
tcb.setTop(ctb);
sample.setTcBorders(tcb);
tcTAF.setTcPr(sample);
setGrid(tcTAF, 3, factory);
tcTAF.getContent().add(
wordMLPackage.getMainDocumentPart().createParagraphOfText("sample cell with a border "));
i have set a table and other cells normally. the overall code runs well but the borders of this cell doesnt show.