0 comments (0 comments)0 reactions (0 reactions)0 assignees (0 assignees)Java33,728 stars (33,728 stars)7,599 forks (7,599 forks)batch import
help wanted
Description
您好,大文件导出,服务端使用for循环写入到outputStream中,但是前端下载的时候要等到writer.finish()之后才开是往文件中写数据,为什么不能边写边下载呢?是因为XLSX文件类型的问题吗?
Contributor guide
- Tech stack
- java
- Domain
- backendperformance
- Issue type
- research
- DifficultyEstimated implementation difficulty for a new contributor, from 1 for very small changes to 5 for expert-level work.
- 3
- Estimated timeA rough time range for an experienced contributor to investigate, implement, test, and prepare a pull request.
- half day
- Activity statusHow available the issue appears right now: fresh, active, stale, blocked, or waiting on maintainer input.
- fresh
- ClarityHow clearly the issue explains the expected change, acceptance criteria, and next step.
- mostly clear
- Prerequisites
- JavaOutputStream understandingExcel file format basics
- Newbie friendlinessA 1-100 score estimating how approachable this issue is for first-time contributors.
- 45
- Research direction
- First, examine the EasyExcel source code, particularly the ExcelWriter and its write method to understand how data is flushed to the OutputStream. The issue likely arises because the XLSX format requires all sheet data to be written before finalizing the ZIP structure (due to the XML schema). To verify, look at the `write()` method in `com.alibaba.excel.ExcelWriter` and the `finish()` method. Consider whether streaming via a custom OutputStream that writes chunks as they come is feasible. Check if there are any open issues or discussions about streaming export in the repository. Suggest comparing with libraries like Apache POI that handle streaming differently.