Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

需要在模板中的表格中插入html表格,生成出来里面的表格边框不见了 #12

Closed
zhaozhuaaaa opened this issue Jul 2, 2021 · 5 comments

Comments

@zhaozhuaaaa
Copy link

image

image

@draco1023
Copy link
Owner

提问的时候先想想怎么能让别人清楚你遇到的情况,比如给出你的html内容。
我猜table没有设置边框样式,未设置边框样式的情况下就是不显示的。

@zhaozhuaaaa
Copy link
Author

提问的时候先想想怎么能让别人清楚你遇到的情况,比如给出你的html内容。
我猜table没有设置边框样式,未设置边框样式的情况下就是不显示的。

好的,感谢

@draco1023 draco1023 reopened this Jul 14, 2021
@draco1023
Copy link
Owner

draco1023 commented Jul 14, 2021

poi的行为导致,在表格单元格内插入表格时会先将所有内容全部清空。

https://github.com/apache/poi/blob/7eaca60a1a364ce6e232363d27823e971a992705/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java#L304

@zhaozhuaaaa
Copy link
Author

poi的行为导致,在表格单元格内插入表格时会先将所有内容全部清空。

https://github.com/apache/poi/blob/7eaca60a1a364ce6e232363d27823e971a992705/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java#L304

我想在非空集合的区块对中对某个属性值进行html渲染然后插入到单元格中,具体是该怎么实现,有例子吗?

@draco1023
Copy link
Owner

在最新的0.3.9版本中增加了设置项 showDefaultTableBorderInTableCell ,设置为 true 将默认对表格内部的表格绘制默认的边框,不过如果内部表格拥有边框样式声明,那么将优先使用样式声明。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants