首页>代码>maven工程采用xxl-excel框架实现excel的输入输出excel文件,支持xlsx、xls格式>/xxl-excel-master/xxl-excel-master/src/main/java/com/xuxueli/poi/excel/entity/Dog.java
package com.xuxueli.poi.excel.entity;

import com.xuxueli.poi.excel.annotation.ExcelField;
import com.xuxueli.poi.excel.annotation.ExcelSheet;
import org.apache.poi.hssf.util.HSSFColor;
import java.util.Date;
@ExcelSheet(name="狗狗实体类",headColor = HSSFColor.HSSFColorPredefined.LIGHT_GREEN)
public class Dog {
    @ExcelField(name="编号")
    private String number;
    @ExcelField(name="名称")
    private String name;
    @ExcelField(name="年龄")
    private int age;
    @ExcelField(name="生日",dateformat = "yyyy-MM-dd")
    private Date birthday;
    @ExcelField(name="健康证")
    private String healthCode;
    @ExcelField(name="体重")
    private float weight;

    public Dog(){

    }
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getHealthCode() {
        return healthCode;
    }

    public void setHealthCode(String healthCode) {
        this.healthCode = healthCode;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }




    public Dog(String number, String name, int age, Date birthday, String healthCode, float weight) {
        this.number = number;
        this.name = name;
        this.age = age;
        this.birthday = birthday;
        this.healthCode = healthCode;
        this.weight = weight;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "number='" + number + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", birthday=" + birthday +
                ", healthCode='" + healthCode + '\'' +
                ", weight=" + weight +
                '}';
    }
}
最近下载更多
crosa_Don  LV18 2022年6月7日
Myangyyyy  LV10 2022年4月28日
ledougo  LV11 2020年8月12日
tracer85  LV6 2020年6月14日
zhangjilu  LV18 2020年5月25日
xuyongff  LV24 2020年3月3日
yangxb2  LV10 2020年2月8日
Jackson_李  LV8 2020年1月5日
8战魂5无双8  LV43 2019年12月14日
hjd3983  LV10 2019年10月8日
最近浏览更多
WBelong  LV7 4月2日
1529860026  LV24 2023年6月28日
Eddie233  LV5 2023年6月14日
可是不知道么  LV23 2023年5月6日
微信网友_6040315240812544  LV8 2022年11月3日
crosa_Don  LV18 2022年6月7日
Myangyyyy  LV10 2022年4月28日
wjh12345654321  LV14 2022年1月20日
李润石  LV2 2022年1月18日
Ditto123  LV8 2021年12月9日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友