增加导出功能

This commit is contained in:
wuweihua
2026-10-21 18:06:21 +08:00
parent c04191c316
commit 92000956fc
15 changed files with 1181 additions and 21 deletions
@@ -568,6 +568,19 @@ public class ExcelUtil<T>
exportExcel(response, list, sheetName, StringUtils.EMPTY);
}
/**
* Common one-liner export for controllers.
*
* @param response HTTP response
* @param list export rows
* @param clazz row class with @Excel fields
* @param sheetName sheet / file title
*/
public static <E> void export(HttpServletResponse response, List<E> list, Class<E> clazz, String sheetName)
{
new ExcelUtil<E>(clazz).exportExcel(response, list, sheetName);
}
/**
* 对list数据源将其里面的数据导入到excel表单
*