Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.
/ poi-util Public archive

基于注解动态导出Excel,可跨行合并单元格

Notifications You must be signed in to change notification settings

NewGr8Player/poi-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POI-Export

基于注解导出Excel

对于要导出的数据只需要实现com.xavier.excel.entity.BasicExportModel接口即可

  • BasicExportModel#getUniqueKey()的返回值要求全局唯一
  • BasicExportModel#setIndexNo(String)最好创建一个变量用于存储序号
  • BasicExportModel#getIndexNo()取序号用的方法

支持使用字典项并建立映射关系,只需实现com.xavier.excel.mapping.Mapping接口即可

  • Mapping#getText(Key)使用了泛型,但复杂判断逻辑需要在实现类中自行编写

使用请参考单元测试

  • com.xavier.excel.util.ExcelUtilTest#createExcel
  • com.xavier.excel.util.ExcelUtilTest#createExcelWithMultiSheets

有问题和意见欢迎提issue

About

基于注解动态导出Excel,可跨行合并单元格

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages