Support streaming writer on existing sheets
Description
Hello 👋
Currently, NewStreamWriter in Excelize only supports creating a new sheet for streaming writes. This is very useful for large datasets because of the reduced memory usage.
However, in many real-world use cases, we need to append or modify data on an existing sheet without loading the entire workbook into memory. For example:
- Adding new rows to an existing data sheet with headers already defined.
Currently, the old data in the Sheet will be disappear only new StreamData will be append into it
👉 Feature Request: Enable NewStreamWriter to work on an existing sheet so we can stream data into it directly (append or write new rows) without recreating sheets.
This would make Excelize even more powerful for handling large files with pre-existing templates.
Additional context
No response
Validations
- [x] Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
Thanks for your issue. There is no plan to add this support in the short term.
To address this, we can export the XML data from the file. Except for a few critical data components like SheetData, most of the original template data will be cached. With this approach, it is entirely feasible to extract the original data and re-implement streaming writing to the existing worksheet—allowing us to append or modify data without reloading the entire workbook or recreating the worksheet.
Read existing sheet and streaming write it to a new sheet
Read existing sheet and streaming write it to a new sheet
Thanks man i will try