Write Spreadsheet With Stream

Hi.
Our application fetches a large amount of data from an external API and we need to write it in a spreadsheet. The problem is that because it is a large amount of data we have some problems with timeout errors as we page through this API route and save the data in memory (variable) until all pages are consumed and then write to the spreadsheet. Our idea was instead of saving the data in memory, we wanted to save it in the file as we get the data from the API, but we are currently using the lib Elixlsx, and it has no function to do this with streams. Does anyone have any idea how we could do this?

The excellizer library seems to support stream write but it has 2 NIF dependencies which might not be ideal.