1

我使用 jxls 1.0.5 有一段时间了,最​​近才看到需要迁移到 2.2.5,

在 jxls 1.0.5 中,我可以在另一个语句中嵌入一个语句。

<jx:forEach items="${homeDwellers}" var="homeDweller">
<jx:forEach items="${homeDweller.chores}" var="chore">
</jx:forEach>
</jx:forEach>

这是如何使用 2.2.5 完成的,我只输入 jx:each 的评论?

A1: jx:each(items="homeDwellers" var="homeDweller" lastCell="B3")
A2: jx:each(items="homeDweller.chores" var="chore" lastCell="B2")

??

4

1 回答 1

5

您可以在单个多行单元格注释中定义任意数量的内部命令

jx:each(items="homeDwellers" var="homeDweller" lastCell="B3")
jx:each(items="homeDweller.chores" var="chore" lastCell="B2")

它们将以相同的顺序嵌入。请参阅文档中的类似示例。

此外,您可能想查看jxls-demo 项目中的comment_markup_demo.xls模板,该模板演示了各种标记选项。

于 2015-10-07T19:49:27.167 回答