首页>代码>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 +
'}';
}
}
最近下载更多
最近浏览更多
597117933 LV9
5月27日
WBelong LV8
2024年4月2日
1529860026 LV24
2023年6月28日
Eddie233 LV6
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日

