sax

sax

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.

Most Liked

sax

sax

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.

Where Next?

Popular in Libraries Top

markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
cjen07
parameterized pipe in elixir: |n> edit: negative index in |n> and mixed usage with |> are supported example: use ParamP...
New
pkrawat1
Presenting Aviacommerce, open source e-commerce platform in Elixir Aviacommerce is an open source e-commerce platform in Elixir. We at...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: https://github.com/tmbb/phoenix_ws Phoenix channels are a great...
New
gjaldon
As the title states, EctoEnum has just been updated after some time of hardly any activity in the repo. Here’s the latest release: https:...
New
bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
381 12391 119
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Sub Categories:

We're in Beta

About us Mission Statement