Commit 97f306fc by guojuxing

下载去掉setCellType过期方法

parent 076e9adf
...@@ -68,7 +68,6 @@ public class ExcelUtils { ...@@ -68,7 +68,6 @@ public class ExcelUtils {
continue; continue;
} }
String columnValue = object.toString(); String columnValue = object.toString();
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
cell.setCellValue(columnValue); cell.setCellValue(columnValue);
} }
return true; return true;
...@@ -166,7 +165,6 @@ public class ExcelUtils { ...@@ -166,7 +165,6 @@ public class ExcelUtils {
if (CollectionUtils.isEmpty(sonHeader)) { if (CollectionUtils.isEmpty(sonHeader)) {
//单标题 //单标题
Cell cell2 = row2.createCell(n); Cell cell2 = row2.createCell(n);
cell2.setCellType(HSSFCell.CELL_TYPE_STRING);
cell2.setCellStyle(cellStyle); cell2.setCellStyle(cellStyle);
sheet.addMergedRegion(new CellRangeAddress(0, 1, n, n)); sheet.addMergedRegion(new CellRangeAddress(0, 1, n, n));
n++; n++;
...@@ -177,7 +175,6 @@ public class ExcelUtils { ...@@ -177,7 +175,6 @@ public class ExcelUtils {
//赋值 //赋值
for (int j = 0, sonLength = sonHeader.size(); j < sonLength; j ++) { for (int j = 0, sonLength = sonHeader.size(); j < sonLength; j ++) {
Cell cell2 = row2.createCell(n++); Cell cell2 = row2.createCell(n++);
cell2.setCellType(HSSFCell.CELL_TYPE_STRING);
cell2.setCellStyle(cellStyle); cell2.setCellStyle(cellStyle);
cell2.setCellValue(sonHeader.get(j)); cell2.setCellValue(sonHeader.get(j));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment