[英]How to Set Border thickness of Apache POI XWPFTable table?
我需要設置要看起來為粗體的表,如何設置粗細邊框?
我知道如何更改邊框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));
順便說一句,我到底該知道setSz意味着什么?
你可以試試
borders.addNewBottom().setVal(STBorder.THICK);
STBorder類包含線條邊界和藝術邊界。 插入的所有內容都是線邊框,可以在可以使用邊框的任何地方使用。 從蘋果到蘋果的所有東西都是藝術邊框,只能用於頁面邊框。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.