java 动态导出excel表单 无模板文件下载
public ResponseEntity<byte[]> exportStanding(@PathVariable Long signupId) throws IOException {
MettingSignup mettingSignup = mettingSignupService.getById(signupId);
Meeting meeting = meetingService.getById(mettingSignup.getMeetingId());
List<Map<String, Object>> mapLists = signupUserinfoService.selectBySignupId(signupId,1,1000);
//上面是获取数据,根据自己不同需求去获取不同数据
// 创建工作薄
HSSFWorkbook workbook = new HSSFWorkbook();
// 创建用户工作表
HSSFSheet sheet = workbook.createSheet("报名用户");
//创建行
HSSFRow rows = sheet.createRow(0);
// 动态添加 表头 headList --> 所有表头行集合
List<List<String>> headList = new ArrayList<List<String>>();
List<Map> mapList = formTemplateService.selectFormTitleBySignupId(signupId);
// 第 n 行 的表头
int j=0;
for (Map map:mapList) {
//创建列
rows.crea