Excel解析与数据生成(撑持JXL,POI)

本文介绍了如何使用注解创建一个用于生成Excel的目标类,并详细解释了类中各个字段的作用和方法。
[代码] 运用注解 注解与需求生成Excel目标上 public class Excel {

	@ExcelAnnotation("称号")
	public String bookName;

	@ExcelAnnotation("行数")
	public int rows;

	@ExcelAnnotation("创立时刻")
	public Date createTime; http://www.aaafaipiao.com/linked/20130212.do; 
	
	@ExcelAnnotation("内容")
	public Date content;

	
	public Date getContent() {
		return content;
	}

	public void setContent(Date content) {
		this.content = content;
	}

	public String getBookName() {
		return bookName;
	}

	public void setBookName(String bookName) {
		this.bookName = bookName;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		StringBuffer buffer = new StringBuffer();
		buffer.append("{[bookName : "   (null == bookName ? "" : bookName)
				  "]");
		buffer.append("[rows : "   rows   "]");
		buffer.append("[createTime : "
				  (null == createTime ? "" : DateTools.format(createTime))
				  "]}");
		return buffer.toString();
	}

} http://www.fpfuzhou.com/linked/20130212.do; 

转载于:https://www.cnblogs.com/fpqqchao/archive/2013/02/13/2910679.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值