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.
Could you provide a patch and we will look at it?