Bug 66361 - Start writing file header early for browser download progress
Summary: Start writing file header early for browser download progress
Status: NEEDINFO
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-22 19:57 UTC by mwisnicki
Modified: 2022-12-26 09:38 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mwisnicki 2022-11-22 19:57:42 UTC
Currently DeferredSXSSFWorkbook will only start writing bytes to output stream once the whole workbook and it's sheets are created (with row generator callbacks).

In cases where even setting up workbook is time consuming it would be highly desirable to write PK header first.

The reason for that is if we are streaming to browser, browser will only show download indicator after first by is sent.

Requesting addition of writeHeader(os) method that can be called before workbook is finalized and will write some header bytes. Subsequent write(os) will skip them.


Current workaround: write header myself and pass special output stream to POI that skips over first 2 bytes.
Comment 1 PJ Fanning 2022-12-12 15:24:50 UTC
Could you provide a patch and we will look at it?