POI生成word图表边框设置样式为圆角、方角方法
// 根据个人需求修改传入参数和判断,true为圆角,false为方角
private static void setRoundedCorners(XWPFChart chart, boolean setVal) {
if (chart.getCTChartSpace().getRoundedCorners() == null) {
chart.getCTChartSpace().addNewRoundedCorners();
chart.getCTChartSpace().getRoundedCorners().setVal(setVal);
}
}
实际上就是往word的xml样式中插入了指定的边框样式
该方法参考链接http://hk.voidcc.com/question/p-dgwqgkoo-tx.html
poi使用版本为4.1.2