MyExcel 3.0.0.RELEASE release, enhanced specification & BUG repair

MyExcel, is a set of import, export, encryption, Excel and many other features of Java toolkit.

MyExcel constructed using declarative syntax, read Excel, specific operational details POI shield (no perception of the POI), to develop alternative conventional techniques, such construct (from the simple to the highly complex Excel) Excel and reading becomes very convenient .

The Import:

List<ArtCrowd> result = SaxExcelReader.of(ArtCrowd.class)
        .sheet(0) // 0代表第一个,如果为0,可省略该操作,也可sheet("名称")读取
        .rowFilter(row -> row.getRowNum() > 0) // 如无需过滤,可省略该操作,0代表第一行
        .beanFilter(ArtCrowd::isDance) // bean过滤
        .read(path.toFile());// 

In addition, MyExcel has been used in the actual production environment, export daily read Excel data close to the hundreds of millions, memory footprint, low jitter, enough to cope with the vast majority of scenarios.

This is a major BUG repair and specification enhancements, the update points are as follows:

1. Repair child property attribute overrides the parent class BUG;

2.DefaultExcelBuilder, DefaultStreamExcelBuilder strong type checking, append to avoid erroneous data;

DefaultStreamExcelBuilder<ArtCrowd> streamExcelBuilder = DefaultStreamExcelBuilder
        .of(ArtCrowd.class) // 如导出Map类型数据,请使用of(Map.class)
        .threadPool(Executors.newFixedThreadPool(10))// 线程池,可选
        .capacity(10_000)// 容量设定,在主动划分excel使用,可选
        .start();

streamExcelBuilder.append(data);

3. Time-based format using Excel itself;

4. Unified @ExcelColumn in decimalFormat, dateFormatPattern to format, and streamline configuration items;

@ExcelColumn(title="时间",format="yyyy-MM-dd HH:ss")
Date time;

5. improve the abnormal message - such as abnormal file name, fields, etc., easy to find the error message;

6. Fixed wrong method name -cancle;

7. Support DefaultExcelBuilder, DefaultStreamExcelBuilder dynamic global style settings -globalStyle;

DefaultExcelBuilder.of(ArtCrowd.class)
                   .globalStyle("title->background-color:red")
                   .build(dataList);

8. Support @ExcelColumn read in a reverse mapping;

@ExcelColumn(title="是否会跳舞",mapping="true:是,false:否")
Boolean isDance;

9. Normative name -sheet () (single sheet), sheets () (Multi-Sheet);

// 单个sheet读取
SaxExcelReader.of(ArtCrowd.class).sheet(0).read(excelFile);
// 多个sheet读取
SaxExcelReader.of(ArtCrowd.class).sheets(0,1).read(excelFile);

10. The active removal write formula "=" number;

11. expired DefaultExcelBuilder, DefaultStreamExcelBuilder getInstance method, instead of using the method of;

DefaultExcelBuilder.of(Map.class).build(mapList);

For details, please refer to the documentation: myexcel document

Guess you like

Origin www.oschina.net/news/112577/myexcel-3-3-0-release-released