❇️ Improve the productivity of the Excel operation library. https://git.io/vNjQy
Switch branches/tags
Nothing to show
Clone or download
Latest commit c065d13 Nov 26, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs 📝 update doc cover Nov 26, 2018
src 📝 update doc cover Nov 26, 2018
.gitignore 🔧 add gitignore Apr 26, 2018
.travis.yml 💚 fixed CI build Feb 4, 2018
LICENSE 🎉 initial commit Feb 4, 2018
README.md 🔖 release 0.1.6.RELEASE Nov 16, 2018
pom.xml 🔖 release 0.1.6.RELEASE Nov 16, 2018

README.md

excel-plus

Easier to read and generate an excel file, supports 2003 and 2007.

中文文档

Feature

  • Easy to use
  • Annotation driven
  • Based java 8
  • Support xlsxlsxcsv
  • Support export by template
  • Support custom column style

Usage

As maven dependency

<dependency>
    <groupId>io.github.biezhi</groupId>
    <artifactId>excel-plus</artifactId>
    <version>0.1.6.RELEASE</version>
</dependency>

snapshot version

<dependency>
    <groupId>io.github.biezhi</groupId>
    <artifactId>excel-plus</artifactId>
    <version>0.1.7-SNAPSHOT</version>
</dependency>

Export as file

ExcelPlus excelPlus = new ExcelPlus();
List<Order> orders = queryData();
excelPlus.exportor(orders).writeAsFile(new File("order-list.xls"));

Browser download

ExcelPlus excelPlus = new ExcelPlus();
List<Order> orders = queryData();

excelPlus.exportor(orders)
         .writeAsResponse(ResponseWrapper.create(HttpServletResponse, "order-list.xls"));

Read as file

ExcelPlus excelPlus = new ExcelPlus();

Reader reader = Reader.create()
                .parseType(ParseType.SAX)
                .startRowIndex(2)
                .sheetIndex(0)
                .excelFile(new File("orders.xlsx"));

List<Order> orders = excelPlus.read(Order.class, reader).asList();

Examples

See here

Advanced

Custom export style

Thanks

License

Apache2