当前位置: 首页 > news >正文

Java学习之 EasyExcel

package com.dream.data.form;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@HeadFontStyle(fontName = "微软雅黑", fontHeightInPoints = 11, bold = BooleanEnum.TRUE)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER)
@ContentFontStyle(fontName = "微软雅黑", fontHeightInPoints = 11)
public class MatchForm {

/**时间*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ExcelProperty(value="比赛时间", index = 0)
@ColumnWidth(16)
private LocalDate matchDate;

/**联赛*/
@ExcelProperty(value = "联赛", index = 1)
@ColumnWidth(12)
private String leagueName;

/**主队*/
@ExcelProperty(value = "主队", index = 2)
@ColumnWidth(20)
private String homeTeam;

/**客队*/
@ExcelProperty(value = "客队", index = 3)
@ColumnWidth(20)
private String awayTeam;

@ExcelProperty(value = "高于", index = 4)
@ColumnWidth(12)
private String concedeGreater;

@ExcelProperty(value = "让球", index = 5)
@ColumnWidth(12)
private String concede;

@ExcelProperty(value = "低于", index = 6)
@ColumnWidth(12)
private String concedeLess;

@ExcelProperty(value = "高于", index = 7)
@ColumnWidth(12)
private String goalsGreater;

@ExcelProperty(value = "大小球", index = 8)
@ColumnWidth(12)
private String goals;

@ExcelProperty(value = "低于", index = 9)
@ColumnWidth(12)
private String goalsLess;

@ExcelProperty(value = "比分(全)", index = 10)
@ColumnWidth(12)
private String fullScore;

@ExcelProperty(value = "比分(半)", index = 11)
@ColumnWidth(12)
private String halfScore;
}
http://www.jsqmd.com/news/646630/

相关文章:

  • 从零上手Cursor:AI编程助手的核心功能与实战演练
  • Waifu2x-Extension-GUI终极实战指南:三步解决图像模糊、视频卡顿的完整方案
  • Midscene.js企业级容器化架构设计:高可用AI自动化服务部署方案
  • RPG Maker解密工具终极指南:3分钟掌握游戏资源提取技巧
  • MATLAB图像分割实战:从Otsu阈值到形态学滤波,手把手教你处理一张飞机图片
  • Quartus II 13.0入门指南:VHDL仿真全流程解析
  • 树莓派4B+DHT11温湿度监控:从Python库到GPIO底层驱动,哪种方案更适合你?
  • FreeRTOS在智能家居中的实战:如何用任务管理优化STM32的传感器响应与功耗
  • AI 日报 - 2026年4月15日(周三)
  • 数学建模竞赛数据预处理全攻略:从清洗到增强的完整流程与代码实践
  • OpenRGB:免费开源工具如何一站式管理所有RGB灯光设备?
  • OpenWrt在VMWare中的安装与配置全攻略
  • 2026年3月金属滤袋门店选哪家,粉尘超低排放/高温滤袋/金属滤袋,金属滤袋直销厂家选哪家 - 品牌推荐师
  • 新手避坑指南:超声波探伤仪A扫波形图到底怎么看?从杂波识别到缺陷定级的实战解析
  • PyTorch实战:用Attention Transfer给模型‘开小灶’,提升小模型性能(附完整代码)
  • Wand-Enhancer终极指南:如何免费解锁WeMod完整功能
  • 用MATLAB复现DSSS+8PSK通信系统:从扩频码生成到误码率曲线对比(附完整代码)
  • AI建模工具实战:如何用Meshy生成可直接3D打印的高质量模型(附详细步骤)
  • mysql如何利用索引实现快速分页_mysql分页查询加速
  • 局域网无法用Navicat连接Oracle怎么办_访问权限设置
  • 手把手教你用Stateflow给电机控制“画”流程图:从PWM调速到故障诊断的实战建模
  • 用TM8211双路DAC给STM32项目做个高精度信号发生器(附完整工程)
  • 从YOLOv5到YOLOv8:条形码二维码检测模型的演进与网页端部署实战
  • CSS如何实现移动端文字转阴影效果_通过text-stroke模拟描边
  • Postman并发测试实战:如何高效模拟高负载请求
  • 004、IPFS节点架构与实现:Go-IPFS与JS-IPFS源码导读
  • Python 代码性能分析:从cProfile到line_profiler
  • WM8960音频芯片避坑指南:从设备树配置到驱动加载的5个常见错误
  • LED控制电路
  • memtest_vulkan:GPU显存稳定性测试工具完全指南