You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
3.2 KiB

7 years ago
package com.alibaba.excel.metadata;
import java.util.List;
import java.util.Map;
7 years ago
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.write.handler.WriteHandler;
7 years ago
/**
* sheet
*
7 years ago
* @author jipengfei
*/
public class Sheet {
/**
* Starting from 0
7 years ago
*/
private Integer sheetNo;
7 years ago
/**
* sheet name
7 years ago
*/
private String sheetName;
7 years ago
/**
* Count the number of added heads when read sheet.
*
* <li>0 - This Sheet has no head ,since the first row are the data
* <li>1 - This Sheet has one row head , this is the default
* <li>2 - This Sheet has two row head ,since the third row is the data
7 years ago
*/
private Integer readHeadRowNumber;
7 years ago
/**
* Writes the head relative to the existing contents of the sheet. Indexes are zero-based.
7 years ago
*/
private Integer writeRelativeHeadRowIndex;
7 years ago
/**
* You can only choose one of the {@link Sheet#head} and {@link Sheet#clazz}
7 years ago
*/
private List<List<String>> head;
/**
* You can only choose one of the {@link Sheet#head} and {@link Sheet#clazz}
7 years ago
*/
private Class clazz;
/**
* Custom type conversions override the default
*/
private Map<Class, Converter> customConverterMap;
/**
* Need Head
*/
private Boolean needHead;
/**
* Custom type handler override the default
*/
private List<WriteHandler> customWriteHandlerList;
public Integer getSheetNo() {
return sheetNo;
}
public void setSheetNo(Integer sheetNo) {
this.sheetNo = sheetNo;
}
public String getSheetName() {
return sheetName;
}
public void setSheetName(String sheetName) {
this.sheetName = sheetName;
}
public Integer getReadHeadRowNumber() {
return readHeadRowNumber;
7 years ago
}
public void setReadHeadRowNumber(Integer readHeadRowNumber) {
this.readHeadRowNumber = readHeadRowNumber;
7 years ago
}
public Integer getWriteRelativeHeadRowIndex() {
return writeRelativeHeadRowIndex;
7 years ago
}
public void setWriteRelativeHeadRowIndex(Integer writeRelativeHeadRowIndex) {
this.writeRelativeHeadRowIndex = writeRelativeHeadRowIndex;
7 years ago
}
public List<List<String>> getHead() {
return head;
}
public void setHead(List<List<String>> head) {
this.head = head;
}
public Class getClazz() {
7 years ago
return clazz;
}
public void setClazz(Class clazz) {
7 years ago
this.clazz = clazz;
}
public Map<Class, Converter> getCustomConverterMap() {
return customConverterMap;
7 years ago
}
public void setCustomConverterMap(Map<Class, Converter> customConverterMap) {
this.customConverterMap = customConverterMap;
7 years ago
}
public Boolean getNeedHead() {
return needHead;
7 years ago
}
public void setNeedHead(Boolean needHead) {
this.needHead = needHead;
7 years ago
}
public List<WriteHandler> getCustomWriteHandlerList() {
return customWriteHandlerList;
7 years ago
}
public void setCustomWriteHandlerList(List<WriteHandler> customWriteHandlerList) {
this.customWriteHandlerList = customWriteHandlerList;
}
7 years ago
@Override
public String toString() {
return "Sheet{" + "sheetNo=" + sheetNo + ", sheetName='" + sheetName + '\'' + '}';
}
7 years ago
}