com.gccloud.gcpaas.ooxml.excel.bean.ExcelSheet Maven / Gradle / Ivy
The newest version!
package com.gccloud.gcpaas.ooxml.excel.bean;
import java.io.FileWriter;
/**
* Sheet信息
*/
public class ExcelSheet {
/**
* 操作写入 sheetN.xml 文件
*/
private FileWriter sheetXmlWriter;
/**
* 记录当前行索引,用于sheetXmlWriter写入使用
*/
private int currentRowIndex = 1;
/**
* 当前sheet的索引
*/
private int index = 1;
/**
* 当前sheet资源ID
*/
private int id;
/**
* sheet名称
*/
private String name = "sheet";
/**
* 总行数,包括标题
*/
private int totalRow;
/**
* 最大列
*/
private int maxCol;
public FileWriter getSheetXmlWriter() {
return sheetXmlWriter;
}
public void setSheetXmlWriter(FileWriter sheetXmlWriter) {
this.sheetXmlWriter = sheetXmlWriter;
}
public int getCurrentRowIndex() {
return currentRowIndex;
}
public void incrementCurrentRowIndex() {
currentRowIndex = currentRowIndex + 1;
}
public void setCurrentRowIndex(int currentRowIndex) {
this.currentRowIndex = currentRowIndex;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getId() {
return 10 + index;
}
public int getTotalRow() {
return currentRowIndex - 1;
}
public int getMaxCol() {
return maxCol;
}
public void resetMaxCol(int newCol) {
if (newCol > maxCol) {
this.maxCol = newCol;
}
}
}