ITPub博客

首页 > IT职业 > IT职场 > JXLS

JXLS

IT职场 作者:aleaf2000 时间:2021-09-09 10:40:30 0 删除 编辑

http://jxls.sourceforge.net/images/grouping_template.png

图片描述图片描述

图片描述http://jxls.sourceforge.net/samples/grouping_example.html

Grouping Sample

IntroductionEach-Command .

The Employee class looks like this.

public class Employee {
    private String name;
    private int age;
    private Double payment;
    private Double bonus;

    // getters/setters
    ...}

Report templatereport template for this example uses groupBy attribute of Each-Command
to define the grouping.
jx:each(items="employees" groupBy="name" groupOrder="asc" lastCell="D6")

Since the var attribute is missing the default group name _group is used to refer to the grouped collection items

图片描述

Java codereport for this example is shown on the following screenshot

图片描述


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/381/viewspace-2824770/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2020-07-23

  • 博文量
    0
  • 访问量
    353