MyExcel 3.5.0 release, the absolute path define flexible templates & styles of

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 and build, read performance is very good, very low memory footprint.

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());

The updates are as follows:

  • Image fix problems deriving width of 0, the adaptive image corresponding cells;
  • Repair DefaultStreamExcelBuilder multithreaded export, interlace pattern Mansian;
  • Export template Export Support absolute path - fileTemplate;
  • The default style (blue font, underline) no link style;
  • @ExcelModel global style single style support, such as title&1, the first column heading;
  • Support Map Export styling;
  • Export support template hyperlink recognition criteria <a href="http://www.baidu.com">百度</a>;
  • When using the support frame is provided border-style, set once all borders, without separately provided, simplify operation;
  • Reconstruction of DefaultExcelBuilder\DefaultStreamExcelBuilderstyle analysis module;
  • Outdated hasStylemethod, the default fill style when style;
  • Expired template export templatemethod, classpathTemplateinstead of;
  • Expired WidthStrategy.CUSTOM_WIDTHcustom width strategies to support any width set the width of the Strategy pattern;
  • Expired globalStylemethod, stylea method in place;
  • Export jsoup version upgrade template, templates significantly improved export performance and memory usage;

Template derived class path support:

try (ExcelBuilder excelBuilder = new FreemarkerExcelBuilder()) {
     Workbook workbook = excelBuilder
              .classpathTemplate("/templates/freemarkerToExcelExample.ftl")
              .build(dataMap);
     AttachmentExportUtil.export(workbook, "freemarker_excel", response);
}

Export template support absolute path:

try (ExcelBuilder excelBuilder = new FreemarkerExcelBuilder()) {
     Workbook workbook = excelBuilder
              .fileTemplate("/Users/downloads/templates","freemarkerToExcelExample.ftl")
              .build(dataMap);
     AttachmentExportUtil.export(workbook, "freemarker_excel", response);
}

In particular venue, see the documentation: Documentation

Guess you like

Origin www.oschina.net/news/113935/myexcel-3-5-0-released