文件名称:基于poi Excel导出
文件大小:12KB
文件格式:JAR
更新时间:2019-12-20 12:27:58
excel导出
实例:import java.util.Date;
import org.xlp.annotation.ExcelOutputed;
public class Student {
@ExcelOutputed
private int id;
@ExcelOutputed("姓名")
private String name;
@ExcelOutputed("生日")
private Date timDate;
@ExcelOutputed
private boolean d;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getTimDate() {
return timDate;
}
public void setTimDate(Date timDate) {
this.timDate = timDate;
}
public boolean isD() {
return d;
}
public void setD(boolean d) {
this.d = d;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Student [id=").append(id).append(", name=")
.append(name).append(", timDate=").append(timDate)
.append(", d=").append(d).append("]");
return builder.toString();
}
}
public class Test(){
public static void main(String[] args) {
anno();
testMap();
}
}
public static void anno(){
Student student = new Student();
student.setId(1);
student.setName("张三;; ");
student.setTimDate(new Date());
Student student1 = new Student();
student1.setId(1);
student1.setName("张三1");
student1.setTimDate(new Date());
List