Exceed - streaming XLSX generation

Hello! This is a little late in terms of years since shipping, but I just realized that I’d never shared exceed, which is a library for creating Excel spreadsheets from streams. Maybe it will be helpful for others.

When generating smallish spreadsheets (100s of thousands of rows), it performs about 30-40% as quickly as elixlsx. When you get to millions of rows on cheap/small infrastructure, it catches up. One of the best features is that, with chunked output from a Phoenix controller, file download can start almost immediately without having to wait for the entire file to be completely generated.

Recently I’ve spent time improving performance, and benchmarking it against elixlsx, which is a fantastic library. We wrote ours after working on a project that created multi-GB spreadsheets containing tens of millions of rows, where we didn’t want to pay the cost of building the entire spreadsheet in memory.

10 Likes

Regarding performance, I think that it could be a lot faster if we replaced the XML generation with simpler string interpolation, like elixlsx does, rather than the current way which uses a lot of nested iodata to be passed to the XmlStream library. I would be happy to be proven wrong (please do and file PRs!), but I think I’m at the limit of what can be eked out without rewriting the XML generation and/or zipping.

I think an extremely fast (binary vs iodata) stream-based XML generator would be a nice thing to have, but don’t really have the time to do it right now without some sort of sponsorship.

2 Likes