1.maven

<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>2.2.6</version>
</dependency>


2.demodata
package com.demo.controller.excl;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;

import java.util.Date;

@Data

public class DemoData {

    @ExcelProperty("字符串标题")

    private String string;

    @ExcelProperty("日期标题")

    private Date date;

    @ExcelProperty("数字标题")

    private Double doubleData;

    /**

     * 忽略这个字段

     */

    @ExcelIgnore

    private String ignore;

}
View Code

相关文章:

  • 2021-12-02
  • 2022-01-21
  • 2022-02-08
  • 2021-10-03
  • 2021-12-30
  • 2021-12-22
  • 2021-10-27
  • 2022-12-23
猜你喜欢
  • 2021-10-13
  • 2021-09-18
  • 2021-09-11
  • 2022-12-23
  • 2021-11-22
  • 2021-11-17
相关资源
相似解决方案