优化导出excel的功能,解决数字展示的问题

This commit is contained in:
jishenghua
2025-05-21 15:47:49 +08:00
parent 7b2d078382
commit bb42839130
4 changed files with 32 additions and 24 deletions

View File

@@ -648,14 +648,14 @@ public class SystemConfigService {
public void exportExcelByParam(String title, String head, String tip, JSONArray arr, HttpServletResponse response) throws Exception {
List<String> nameList = StringUtil.strToStringList(head);
String[] names = StringUtil.listToStringArray(nameList);
List<String[]> objects = new ArrayList<>();
List<Object[]> objects = new ArrayList<>();
if (null != arr) {
for (Object object: arr) {
List<Object> list = (List<Object>) object;
String[] objs = new String[names.length];
Object[] objs = new Object[names.length];
for (int i = 0; i < list.size(); i++) {
if(null != list.get(i)) {
objs[i] = list.get(i).toString();
objs[i] = list.get(i);
}
}
objects.add(objs);