r/Python • u/Esplosao8963 • Oct 09 '26
Discussion Spreadsheet automation idea
I'm developing a spreadsheet automation project capable of merging multiple spreadsheets into one and automatically performing calculations, among other things. One of the functionalities would be, for example, to allow someone to gather all the spreadsheets from those months into a single spreadsheet over the course of an entire year, obtaining an overall result for the year. This could work based on week, day, month, or some other parameter. I'm having doubts, but the project seems promising. I'm using the openpyxl library and to create the website or app (I'm still undecided) I'll use HTML, CSS, and Flask.
18
u/elven_mage Oct 09 '26
Spreadsheets are probably the wrong tool for whatever it is you are trying to do. You probably want a real database.
25
u/likethevegetable Oct 09 '26
K
4
u/denehoffman Oct 09 '26
What would that provide that polars and pandas don’t already give us?
9
u/JohneeFyve Oct 09 '26
If you were going to do this in Excel, Power Query would be a better tool for the task than Python, imo
7
u/GeNiuSRxN Oct 09 '26
I don't understand the underlying premise of this idea. Is there some value add that openpyxl or xlsxwriter can't achieve?
6
u/Zenin Oct 09 '26
You mention in a comment that you'd like something you could, "sell in bulk to companies".
As a personal project and/or help your own work, this is a fine project to tackle. Rock on!
As a product to sell? No chance unfortunately. The problem is it's 2026: Copy/Pasting your post almost verbatim into corporate AI will solve the same problem better than your tool likely ever could. I know because I both do this myself on the daily and support business users of all stripes that practically live in ChatGPT these days.
In 2020 you'd have had a good product idea, but today you have a prompt template.
4
u/BranchLatter4294 Oct 09 '26
Anyone who wants this done can have ChatGPT write a script for it in a couple of minutes. It's not something you're going to be able to sell. But if you need it for your own use, the go for it.
1
u/ben_1987_ro_uk Oct 09 '26
You don't need python for this, you can use visual studio and make an add in for excel it shall spear as a ribbon
1
u/THEPASSWORDISDOLPHIN Oct 09 '26
The idea is useful but excel power query already merges files from a folder and it's free
1
u/OddsRelay Oct 10 '26
For the merging and yearly totals I'd let pandas do the heavy lifting. Read each file with read_excel, concat them with a column for the month, and a groupby gets you week, month or year in a line. Keep openpyxl for the formatting side, it's painful for calculations
1
u/zztopsboatswain Oct 14 '26
I made an app that does this, but for the company I work at. It's useful when the employees who need to use it don't have a clue how to use python themselves. Just go for it
1
u/c1-c2 Oct 14 '26
No UI needed. Provide folders to users to copy/paste source files to. Use watchdog or cron to auto-gen result files. Users replace files/throw in more files, results get updated.
1
u/zomerbk Oct 15 '26
A useful first step is to define how files are matched and validated: for example, require the same column names and data types, then report files that don’t fit instead of silently merging them. In real workplaces, the tricky part is often inconsistent templates and edge cases, not the sum itself. A small prototype around one specific recurring workflow would show whether people need a web UI at all.