apoorv-2204
Goal: I need to export reports as part of CRM as xlsx, as with all the format provided
Required Formatting:
- pivot tables
- filters, sort
- cell formatting (color, bg color,border,etc)
- formulas
- multiple sheets
- font formatting
Question:
Q1. Is it possible to export all this data to xlsx with feature mentioned above ?
- it means i want to query data from db and write to excel with formatting and send for download
Q2 - which libraary should I usee for it?
List of Libraries I found, I have gone through them but not sure
link
https://hex.pm/packages/xlsxir
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
MRdotB
I’ve extensively used the Elixlsx package to generate complex Excel exports for a cashier app, covering various aspects like VAT, sales, discounts, and more (10 sheets export). While the library is functional, it has some limitations, such as lacking support for pivot tables, filters, and sorting. Additionally, the performance of the library is not great.
Looking back, I wish someone had shared a more efficient method for creating complex Excel exports before I began this project. Here’s an approach that could save you significant time and effort:
If there’s ever an issue with the calculations, it’s easier to debug. Either it’s a problem with the raw data or an issue with the Excel template’s formula.
The primary downside of this approach is the presence of an extra sheet dedicated to raw data. However, I would choose this method 100% if I had to redo any complex Excel export in the future.
apoorv-2204
what about Excelizer — excelizer v0.1.7
it says it supports but itss in golang,so its a nif wrapper
apoorv-2204
can i just create a template? and put it in priv. and just write it out?
cmo
I think for that level of functionality you need a port to Python’s XlsxWriter or some other fullly featured lib in another language, or you drop down to XML.
MRdotB
Not sure if there is a lib in elixir that can already do something similar.
Here is an exemple with python and openpyxl write data in a specific excel sheet · GitHub
You write on the specific sheet your other sheet can reference it ex:
=SUM('raw data'!B:B)apoorv-2204
using this can we write to existing sheet? like over a templatee?
want to write to specfic sheet/
shishini
I know and worked on two types of Excel reports (there could be more I dont know)
1. Data Tab
The excel document have (usually a hidden) tab, that have the data
and other tabs act as reports on this data, usually pivot tables, the data table may include calculated columns, but make sure you know the difference between measure and calculated column
2. External Data source
I add a connection to an external data source , and create sheets or pivot tables that use this source
In both types, you create the Excel report using Excel and you only automate updating the data source, whether external in a database or the data tab inside the excel document
So basically you are creating an ETL job, that is it
The need to dynamically create the report, suggest you are creating an excel report writer in Elixir, so this is a completely different thing
Reporting writer vs Report
Don’t create a report writer, when all you want is a report
(Editing HTML by hand is an example of solving the wrong problem)
MRdotB
Sure, it write over an existing sheet called
"raw data".@shishini, thanks for the interesting tips! I didn’t know you could hide tab
.
The External Data Source approach is also interesting—I wasn’t aware of it either. I read a bit about it it seems you can pull data from a JSON Api that you could serve with Phoenix.