mirror of https://github.com/alibaba/easyexcel
Jiaju Zhuang
5 years ago
9 changed files with 196 additions and 39 deletions
@ -0,0 +1,27 @@
|
||||
package com.alibaba.easyexcel.test.temp.simple; |
||||
|
||||
import java.util.Date; |
||||
|
||||
import org.apache.poi.ss.usermodel.FillPatternType; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class DemoData1 { |
||||
@ExcelProperty("字符串标题") |
||||
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 42) |
||||
private String string; |
||||
@ExcelProperty("日期标题") |
||||
private Date date; |
||||
@ExcelProperty("数字标题") |
||||
private Double doubleData; |
||||
/** |
||||
* 忽略这个字段 |
||||
*/ |
||||
@ExcelIgnore |
||||
private String ignore; |
||||
} |
@ -0,0 +1,27 @@
|
||||
package com.alibaba.easyexcel.test.temp.simple; |
||||
|
||||
import java.util.Date; |
||||
|
||||
import org.apache.poi.ss.usermodel.FillPatternType; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
||||
|
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
public class DemoData2 { |
||||
@ExcelProperty("字符串标题") |
||||
@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 42) |
||||
private String string; |
||||
@ExcelProperty("日期标题") |
||||
private Date date; |
||||
@ExcelProperty("数字标题") |
||||
private Double doubleData; |
||||
/** |
||||
* 忽略这个字段 |
||||
*/ |
||||
@ExcelIgnore |
||||
private String ignore; |
||||
} |
Loading…
Reference in new issue