如何设置Apache POI XWPFTable表的边框厚度?

时间:2018-01-02 13:29:57

标签: java apache-poi xwpf

我需要设置我想要看起来粗糙的表,以便如何设置厚度边框?

我知道如何改变边界    borders.addNewBottom().setVal(STBorder.SINGLE);

但如何改变边框厚度?

编辑: 我做到了。 像这样:

table3.getCTTbl().getTblPr().getTblBorders().getTop().setSz(BigInteger.valueOf(11));
                        table3.getCTTbl().getTblPr().getTblBorders().getLeft().setSz(BigInteger.valueOf(12));
                        table3.getCTTbl().getTblPr().getTblBorders().getRight().setSz(BigInteger.valueOf(12));
                        table3.getCTTbl().getTblPr().getTblBorders().getBottom().setSz(BigInteger.valueOf(12));
                        table3.getCTTbl().getTblPr().getTblBorders().getInsideH().setSz(BigInteger.valueOf(12));
                        table3.getCTTbl().getTblPr().getTblBorders().getInsideV().setSz(BigInteger.valueOf(12));

BTW我到底该怎么知道setSz意味着什么?

1 个答案:

答案 0 :(得分:0)

你可以尝试

Integer

STBorder类包含线条边框和艺术边框。插入的所有内容都是线条边框,可以在任何可以使用边框的地方使用。苹果下来的所有东西都是艺术边框,只能用于页面边框。

相关问题