|
@@ -150,7 +150,7 @@ public class ExcelUtil {
|
|
// return "";
|
|
// return "";
|
|
}
|
|
}
|
|
|
|
|
|
- public static String exportTwoSheetGeneralExcelByTitleAndList(String title, List<List<String>> sheetOneList,List<List<String>> sheetTwoList, String downloadPath) {
|
|
|
|
|
|
+ public static String exportTwoSheetGeneralExcelByTitleAndList(String title, List<List<String>> sheetOneList,List<List<String>> sheetTwoList, String downloadPath,String sheetOneName,String sheetTwoName) {
|
|
String result="系统提示:Excel文件导出成功!";
|
|
String result="系统提示:Excel文件导出成功!";
|
|
String fileName= title+".xls";
|
|
String fileName= title+".xls";
|
|
try {
|
|
try {
|
|
@@ -165,7 +165,9 @@ public class ExcelUtil {
|
|
HSSFWorkbook workBook = new HSSFWorkbook();
|
|
HSSFWorkbook workBook = new HSSFWorkbook();
|
|
// 创建工作类
|
|
// 创建工作类
|
|
HSSFSheet sheetOne = workBook.createSheet();
|
|
HSSFSheet sheetOne = workBook.createSheet();
|
|
|
|
+ workBook.setSheetName(0,sheetOneName);
|
|
HSSFSheet sheetTwo = workBook.createSheet();
|
|
HSSFSheet sheetTwo = workBook.createSheet();
|
|
|
|
+ workBook.setSheetName(1,sheetTwoName);
|
|
sheetOne.setDefaultColumnWidth(16);
|
|
sheetOne.setDefaultColumnWidth(16);
|
|
sheetTwo.setDefaultColumnWidth(16);
|
|
sheetTwo.setDefaultColumnWidth(16);
|
|
//设置字体样式
|
|
//设置字体样式
|