|
|
@ -110,9 +110,13 @@ public class ExcelUtils { |
|
|
|
for (int j = 0; j < values.length; j++) { |
|
|
|
for (int j = 0; j < values.length; j++) { |
|
|
|
Cell cell1 = row.createCell(j); |
|
|
|
Cell cell1 = row.createCell(j); |
|
|
|
cell1.setCellStyle(cellStyle); |
|
|
|
cell1.setCellStyle(cellStyle); |
|
|
|
|
|
|
|
if (values[j] instanceof Number) { |
|
|
|
|
|
|
|
cell1.setCellValue(Double.parseDouble(String.valueOf(values[j]))); |
|
|
|
|
|
|
|
} else { |
|
|
|
cell1.setCellValue(String.valueOf(values[j])); |
|
|
|
cell1.setCellValue(String.valueOf(values[j])); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < headerList.size(); i++) { |
|
|
|
for (int i = 0; i < headerList.size(); i++) { |
|
|
|
sheet.setColumnWidth(i, headerList.get(i).length() * 800); |
|
|
|
sheet.setColumnWidth(i, headerList.get(i).length() * 800); |
|
|
|