MyExcel 4.3.3 version released

MyExcel is a Java toolkit that integrates multiple functions such as importing, exporting, and encrypting Excel.

MyExcel uses declarative syntax to build and read Excel, shielding the specific operation details of POI (not aware of POI), and developing commonly used technology alternatives, making it extremely convenient to build (from simple to highly complex Excel) and read Excel. , and the construction and reading performance are extremely excellent, and the memory usage is extremely low.

For example, import:

List<ArtCrowd> result = SaxExcelReader.of(ArtCrowd.class)
        .sheet(0) // 0代表第一个sheet,如果为0,可省略该操作,也可sheet("名称")读取
        .rowFilter(row -> row.getRowNum() > 0) // 如无需过滤,可省略该操作,0代表第一行
        .detectedMerge() // 识别合并单元格并填充数据,默认不识别
        .read(path.toFile());

The update points are as follows :

  • Fixed the issue of @MultiColumn being invalid when not selecting all fields for export;
  • Supports jakarta.servlet and can be exported using attachments in springboot 3;
  • Support cohesive export;
  • Upgrade poi version to 5.2.4;
  • Other dependency version upgrades;

Among them, the cohesive export is as follows:

The difference between aggregate export and aggregate column export is that  the object the annotation @MultiColumn acts on is not a List , but a custom object:

public class School{
   
   @ExcelColumn(title = "学校名称")
   String schoolName;

   @MultiColumn(classType = ExtendedInfo.class)
   ExtendedInfo extendedInfo;

}

public class ExtendedInfo {

   @ExcelColumn(title = "学生总数")
   Integer count;
    
   @ExcelColumn(title = "学生姓名")
   List<String> studentNames;
    
}

For details, please go to the documentation : https://github.com/liaochong/myexcel/wiki

Guess you like

Origin www.oschina.net/news/266909/myexcel-4-3-3-released