完善excel导出接口的逻辑

This commit is contained in:
jishenghua
2024-03-30 14:48:33 +08:00
parent 6aa51ffdc4
commit 44e34c78ce
5 changed files with 21 additions and 23 deletions

View File

@@ -504,7 +504,7 @@ public class SystemConfigService {
if (null != arr) {
for (Object object: arr) {
List<Object> list = (List<Object>) object;
String[] objs = new String[100];
String[] objs = new String[names.length];
for (int i = 0; i < list.size(); i++) {
if(null != list.get(i)) {
objs[i] = list.get(i).toString();
@@ -513,7 +513,7 @@ public class SystemConfigService {
objects.add(objs);
}
}
File file = ExcelUtils.exportObjectsWithoutTitle(title, tip, names, title, objects);
File file = ExcelUtils.exportObjectsOneSheet(title, tip, names, title, objects);
ExcelUtils.downloadExcel(file, file.getName(), response);
}
}