https://github.com/hellokaton/excel-plus
❇️ Improve the productivity of the Excel operation library. https://hellokaton.github.io/excel-plus/#/
https://github.com/hellokaton/excel-plus
excel excel-export excel-import excel-to-json jxl
Last synced: 11 days ago
JSON representation
❇️ Improve the productivity of the Excel operation library. https://hellokaton.github.io/excel-plus/#/
- Host: GitHub
- URL: https://github.com/hellokaton/excel-plus
- Owner: hellokaton
- License: apache-2.0
- Created: 2018-02-04T09:48:27.000Z (about 7 years ago)
- Default Branch: dev
- Last Pushed: 2025-02-19T03:28:42.000Z (about 2 months ago)
- Last Synced: 2025-03-28T05:06:48.115Z (18 days ago)
- Topics: excel, excel-export, excel-import, excel-to-json, jxl
- Language: Java
- Homepage:
- Size: 634 KB
- Stars: 190
- Watchers: 6
- Forks: 46
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - hellokaton/excel-plus - ❇️ Improve the productivity of the Excel operation library. https://hellokaton.github.io/excel-plus/#/ (Java)
README
# excel-plus
Easier to read and generate an excel file, supports `XLSX`、`XLS`、`CSV`.
[](http://www.elegantobjects.org)
[](http://www.rultor.com/p/hellokaton/excel-plus)[](https://travis-ci.org/hellokaton/excel-plus)
[](http://javadoc.io/doc/io.github.biezhi/excel-plus)
[](https://search.maven.org/search?q=excel-plus)
[](https://github.com/hellokaton/excel-plus/blob/master/LICENSE)[](https://codecov.io/gh/hellokaton/excel-plus)
[](https://sonarcloud.io/dashboard/index/io.github.biezhi:excel-plus)# Feature
- Easy to use
- Annotation driven
- Based java 8
- Support `xls`、`xlsx`、`csv`
- Support export by template
- Support custom column style
- High performance, only 30 seconds to read or write `1,000,000` lines# Usage
**How to use**. Latest version here
```xml
io.github.biezhi
excel-plus
1.0.8```
snapshot version
```xml
snapshots-repo
https://oss.sonatype.org/content/repositories/snapshots
false
true
io.github.biezhi
excel-plus
1.0.8-SNAPSHOT
```
**Read excel as List**

```java
public class Member {@ExcelColumn(title = "卡号", index = 0)
private Long cardNo;@ExcelColumn(title = "卡类型", index = 1)
private String cardType;@ExcelColumn(title = "领用状态", index = 2)
private String requisitionStatus;@ExcelColumn(title = "状态", index = 3)
private String status;@ExcelColumn(title = "余额(元)", index = 6)
private BigDecimal amount;@ExcelColumn(title = "会员", index = 7)
private String nickname;@ExcelColumn(title = "性别", index = 9)
private String gender;@ExcelColumn(title = "手机", index = 10)
private String mobile;@ExcelColumn(title = "发卡日期", index = 14, datePattern = "M/d/yyyy HH:mm")
private Date sendCardTime;
// getter setter 省略
}
``````java
List members = Reader.create(Member.class)
.from(new File("members.xlsx"))
.start(1)
.asList();
```**Write excel as file**
```java
public class Book {@ExcelColumn(title = "书名", index = 0)
private String title;
@ExcelColumn(title = "作者", index = 1)
private String author;@ExcelColumn(title = "售价", index = 2)
private Double price;@ExcelColumn(title = "出版日期", index = 3, datePattern = "yyyy年M月")
private LocalDate publishDate;
// getter setter 省略
}
``````java
Writer.create()
.withRows(books)
.headerTitle("书籍列表 V1")
.to(new File("book.xlsx"));
```
Code See [here](https://github.com/hellokaton/excel-plus/blob/master/src/test/java/io/github/biezhi/excel/plus/examples/WriterExample.java#L145)
**Browser download**
```java
Writer.create()
.withRows(orders)
.to(ResponseWrapper.create(HttpServletResponse, "order-list.xls"));
```# Examples
See [here](https://github.com/hellokaton/excel-plus/blob/master/src/test/java/io/github/biezhi/excel/plus/examples)
# Thanks
- [ydq](https://github.com/ydq)
# License
[Apache2](https://github.com/hellokaton/excel-plus/blob/master/LICENSE)