|
|
@@ -14,54 +14,49 @@ public class TemplateExportParams extends ExcelBaseParams { |
|
|
|
/**
|
|
|
|
* 模板的路径
|
|
|
|
*/
|
|
|
|
private String templateUrl;
|
|
|
|
private String templateUrl;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 需要导出的第几个 sheetNum,默认是第0个
|
|
|
|
*/
|
|
|
|
private int sheetNum = 0;
|
|
|
|
private Integer[] sheetNum = new Integer[] { 0 };
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 这只sheetName 不填就使用原来的
|
|
|
|
*/
|
|
|
|
private String sheetName;
|
|
|
|
private String sheetName;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 表格列标题行数,默认1
|
|
|
|
*/
|
|
|
|
private int headingRows = 1;
|
|
|
|
private int headingRows = 1;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 表格列标题开始行,默认1
|
|
|
|
*/
|
|
|
|
private int headingStartRow = 1;
|
|
|
|
private int headingStartRow = 1;
|
|
|
|
/**
|
|
|
|
* Excel 导出style
|
|
|
|
*/
|
|
|
|
private Class<?> style = ExcelExportStylerDefaultImpl.class;
|
|
|
|
private Class<?> style = ExcelExportStylerDefaultImpl.class;
|
|
|
|
|
|
|
|
public TemplateExportParams() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public TemplateExportParams(String templateUrl) {
|
|
|
|
public TemplateExportParams(String templateUrl, Integer... sheetNum) {
|
|
|
|
this.templateUrl = templateUrl;
|
|
|
|
if (sheetNum != null && sheetNum.length > 0) {
|
|
|
|
this.sheetNum = sheetNum;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public TemplateExportParams(String templateUrl, int sheetNum) {
|
|
|
|
this.templateUrl = templateUrl;
|
|
|
|
this.sheetNum = sheetNum;
|
|
|
|
}
|
|
|
|
|
|
|
|
public TemplateExportParams(String templateUrl, String sheetName) {
|
|
|
|
public TemplateExportParams(String templateUrl, String sheetName, Integer... sheetNum) {
|
|
|
|
this.templateUrl = templateUrl;
|
|
|
|
this.sheetName = sheetName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public TemplateExportParams(String templateUrl, String sheetName, int sheetNum) {
|
|
|
|
this.templateUrl = templateUrl;
|
|
|
|
this.sheetName = sheetName;
|
|
|
|
this.sheetNum = sheetNum;
|
|
|
|
if (sheetNum != null && sheetNum.length > 0) {
|
|
|
|
this.sheetNum = sheetNum;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getHeadingRows() {
|
|
|
@@ -76,7 +71,7 @@ public class TemplateExportParams extends ExcelBaseParams { |
|
|
|
return sheetName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getSheetNum() {
|
|
|
|
public Integer[] getSheetNum() {
|
|
|
|
return sheetNum;
|
|
|
|
}
|
|
|
|
|
|
|
@@ -96,10 +91,14 @@ public class TemplateExportParams extends ExcelBaseParams { |
|
|
|
this.sheetName = sheetName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSheetNum(int sheetNum) {
|
|
|
|
public void setSheetNum(Integer[] sheetNum) {
|
|
|
|
this.sheetNum = sheetNum;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSheetNum(Integer sheetNum) {
|
|
|
|
this.sheetNum = new Integer[] { sheetNum };
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTemplateUrl(String templateUrl) {
|
|
|
|
this.templateUrl = templateUrl;
|
|
|
|
}
|
|
|
|