jxls2 中 jx:each 内 jx:each 的语法是什么

use*_*566 1 jxls

我已经使用 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>
Run Code Online (Sandbox Code Playgroud)

在 2.2.5 中,我只输入 jx:each 的注释,这是如何完成的?

A1: jx:each(items="homeDwellers" var="homeDweller" lastCell="B3")
A2: jx:each(items="homeDweller.chores" var="chore" lastCell="B2")
Run Code Online (Sandbox Code Playgroud)

??

Leo*_*hyn 6

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

jx:each(items="homeDwellers" var="homeDweller" lastCell="B3")
jx:each(items="homeDweller.chores" var="chore" lastCell="B2")
Run Code Online (Sandbox Code Playgroud)

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

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