Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

❇️ 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

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easier to read and generate an excel file, supportsXLSXXLSCSV.

EO principles respected hereDevOps By Rultor.com

Javadocs

codecovSonarQube

中文文档

Feature

  • Easy to use
  • Annotation driven
  • Based java 8
  • Supportxlsxlsxcsv
  • Support export by template
  • Support custom column style
  • High performance, only 30 seconds to read or write1,000,000 lines

Usage

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

Examples

Seehere

Thanks

License

Apache2


[8]ページ先頭

©2009-2025 Movatter.jp