FastExcel: High‑Performance Java Excel Library – Features, Migration Guide and Usage Examples
The article announces the rebranding of EasyExcel‑Plus to FastExcel, outlines its high‑performance features, provides migration instructions and code samples for Maven and Gradle, and additionally promotes a ChatGPT community and related services.
EasyExcel‑Plus has been officially renamed to FastExcel , and the author is actively promoting the new project.
FastExcel inherits all EasyExcel capabilities while offering better performance, additional features such as reading specific rows and converting Excel to PDF, and remains free under the MIT license.
Main features include:
Full compatibility with EasyExcel, allowing seamless migration.
Simple migration by changing the package name and Maven/Gradle dependency.
Performance‑optimized read/write operations with low memory consumption.
Stream‑based processing for handling massive datasets.
To use FastExcel, add the following Maven dependency:
<dependency>
<groupId>cn.idev.excel</groupId>
<artifactId>fastexcel</artifactId>
<version>1.0.0</version>
</dependency>Or add the Gradle dependency:
dependencies {
implementation 'cn.idev.excel:fastexcel:1.0.0'
}Migration steps:
Replace the EasyExcel Maven/Gradle dependency with the FastExcel one.
Change import statements from com.alibaba.excel.* to cn.idev.excel.* .
If you prefer not to modify code, you can keep both libraries but are encouraged to switch fully to FastExcel.
Example of reading an Excel file with FastExcel:
// Implement ReadListener
public class DemoDataListener implements ReadListener
{
@Override
public void invoke(DemoData data, AnalysisContext context) {
System.out.println("Parsed data: " + JSON.toJSONString(data));
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
System.out.println("All data parsed!");
}
}
public static void main(String[] args) {
String fileName = "demo.xlsx";
// Read Excel file
FastExcel.read(fileName, DemoData.class, new DemoDataListener())
.sheet()
.doRead();
}Example of writing an Excel file:
public class DemoData {
@ExcelProperty("String Title")
private String string;
@ExcelProperty("Date Title")
private Date date;
@ExcelProperty("Number Title")
private Double doubleData;
@ExcelIgnore
private String ignore;
}
private static List
data() {
List
list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
DemoData d = new DemoData();
d.setString("String" + i);
d.setDate(new Date());
d.setDoubleData(0.56);
list.add(d);
}
return list;
}
public static void main(String[] args) {
String fileName = "demo.xlsx";
FastExcel.write(fileName, DemoData.class)
.sheet("Template")
.doWrite(data());
}Beyond the technical guide, the article also advertises a ChatGPT community, offering free accounts, training materials, and paid membership plans.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.