html2excel

Html2excel, is a toolkit that can directly use Html files, or use the built-in Freemarker, Groovy, Beetl and other template engine Excel builder to generate Html files, and use the Table in the Html file as an Excel template to generate Excel of any complex layout. Supports .xls and .xlsx formats, supports personalization of background colors, borders, fonts, etc., and supports merging of cells.

License

License

GroupId

GroupId

com.github.liaochong
ArtifactId

ArtifactId

html2excel
Last Version

Last Version

1.4.1
Release Date

Release Date

Type

Type

jar
Description

Description

html2excel
Html2excel, is a toolkit that can directly use Html files, or use the built-in Freemarker, Groovy, Beetl and other template engine Excel builder to generate Html files, and use the Table in the Html file as an Excel template to generate Excel of any complex layout. Supports .xls and .xlsx formats, supports personalization of background colors, borders, fonts, etc., and supports merging of cells.
Project URL

Project URL

https://github.com/liaochong/html2excel
Source Code Management

Source Code Management

https://github.com/liaochong/html2excel

Download html2excel

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.liaochong/html2excel/ -->
<dependency>
    <groupId>com.github.liaochong</groupId>
    <artifactId>html2excel</artifactId>
    <version>1.4.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.liaochong/html2excel/
implementation 'com.github.liaochong:html2excel:1.4.1'
// https://jarcasting.com/artifacts/com.github.liaochong/html2excel/
implementation ("com.github.liaochong:html2excel:1.4.1")
'com.github.liaochong:html2excel:jar:1.4.1'
<dependency org="com.github.liaochong" name="html2excel" rev="1.4.1">
  <artifact name="html2excel" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.liaochong', module='html2excel', version='1.4.1')
)
libraryDependencies += "com.github.liaochong" % "html2excel" % "1.4.1"
[com.github.liaochong/html2excel "1.4.1"]

Dependencies

compile (6)

Group / Artifact Type Version
org.apache.poi : poi-ooxml jar 4.0.1
org.jsoup : jsoup jar 1.11.3
org.slf4j : slf4j-api jar 1.7.25
com.ibeetl : beetl jar 2.9.7
org.freemarker : freemarker Optional jar 2.3.23
org.codehaus.groovy : groovy-templates Optional jar 2.4.13

provided (2)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.4
javax.servlet : javax.servlet-api jar 4.0.1

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

MyExcel--Excel操作新方式

Build Status Maven Central License Average time to resolve an issue Percentage of issues still open

使用示例参考请移步:示例

简介 | Brief introduction

MyExcel,是一个集导入、导出、加密Excel等多项功能的工具包。

优点 | Advantages

  • 可生成任意复杂表格:本工具使用迭代单元格方式进行excel绘制,可生成任意复杂度excel,自适应宽度、高度;
  • 零学习成本:使用html作为模板,学习成本几乎为零;
  • 支持常用背景色、边框、字体等样式设置:具体参见文档-样式支持部分;
  • 支持.xls、.xlsx、.csv:支持生成.xls、.xlsx后缀的Excel以及.csv文件;
  • 支持公式导出:支持Excel模板中设置公式,降低服务端的计算量;
  • 支持低内存SXSSF模式:支持低内存的SXSSF模式,可利用极低的内存生成.xlsx;
  • 支持生产者消费者模式导出:支持生产者消费者模式导出,无需一次性获取所有数据,分批获取数据配合SXSSF模式实现真正意义上海量数据导出;
  • 支持多种模板引擎:已内置Freemarker、Groovy、Beetl、Thymeleaf等常用模板引擎Excel构建器(详情参见文档Getting started),推荐使用Beetl模板引擎(Beetl文档);
  • 提供默认Excel构建器,直接输出简单Excel:无需编写任何html,已内置默认模板,可直接根据POJO数据列表输出;
  • 支持一次生成多sheet:以table作为sheet单元,支持一份excel文档中多sheet导出;
  • 支持Excel容量设定:支持设定Excel容量,到达容量后自动新建Excel,可构建成zip压缩包导出;

文档 | Document

https://github.com/liaochong/myexcel/wiki

联系以及问题反馈 | Contact me

如本项目对您有所帮助,烦请点击上方star或者在下方扫码支付任意金额以鼓励作者更好地开发,十分感谢您的关注!

Versions

Version
1.4.1
1.4.0
1.3.1
1.3.0
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
0.0.1