This repository was archived by the owner on Apr 11, 2025. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork46
❇️ Improve the productivity of the Excel operation library.https://hellokaton.github.io/excel-plus/#/
License
NotificationsYou must be signed in to change notification settings
hellokaton/excel-plus
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Easier to read and generate an excel file, supportsXLSX
、XLS
、CSV
.
- 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
How to use. Latest version here
<dependency> <groupId>io.github.biezhi</groupId> <artifactId>excel-plus</artifactId> <version>1.0.8</version></dependency>
snapshot version
<repositories> <repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository></repositories><dependencies> <dependency> <groupId>io.github.biezhi</groupId> <artifactId>excel-plus</artifactId> <version>1.0.8-SNAPSHOT</version> </dependency></dependencies>
Read excel as List
publicclassMember {@ExcelColumn(title ="卡号",index =0)privateLongcardNo;@ExcelColumn(title ="卡类型",index =1)privateStringcardType;@ExcelColumn(title ="领用状态",index =2)privateStringrequisitionStatus;@ExcelColumn(title ="状态",index =3)privateStringstatus;@ExcelColumn(title ="余额(元)",index =6)privateBigDecimalamount;@ExcelColumn(title ="会员",index =7)privateStringnickname;@ExcelColumn(title ="性别",index =9)privateStringgender;@ExcelColumn(title ="手机",index =10)privateStringmobile;@ExcelColumn(title ="发卡日期",index =14,datePattern ="M/d/yyyy HH:mm")privateDatesendCardTime;// getter setter 省略}
List<Member>members =Reader.create(Member.class) .from(newFile("members.xlsx")) .start(1) .asList();
Write excel as file
publicclassBook {@ExcelColumn(title ="书名",index =0)privateStringtitle;@ExcelColumn(title ="作者",index =1)privateStringauthor;@ExcelColumn(title ="售价",index =2)privateDoubleprice;@ExcelColumn(title ="出版日期",index =3,datePattern ="yyyy年M月")privateLocalDatepublishDate;// getter setter 省略}
Writer.create() .withRows(books) .headerTitle("书籍列表 V1") .to(newFile("book.xlsx"));
Code Seehere
Browser download
Writer.create() .withRows(orders) .to(ResponseWrapper.create(HttpServletResponse,"order-list.xls"));
Seehere
About
❇️ Improve the productivity of the Excel operation library.https://hellokaton.github.io/excel-plus/#/
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.