It supports CSV/TSV import and export, and a native .cell format that preserves formulas. The formula engine handles SUM, AVERAGE, COUNT, MIN, MAX, and IF with range references.
The codebase is a Cargo workspace: a pure cell-sheet-core library (no TUI dependency) and a cell-sheet-tui crate on top of ratatui. Early days, but it's usable.
To try it out: cargo install cell-sheet-tui
Feedback of any kind is greatly appreciated!
> Supported Functions (v1) > SUM, AVERAGE, COUNT, MIN, MAX, IF
I would recommend switching to numerically stable algorithms for adding numbers and taking their averages sooner rather than later.
Looking at the code[1], it looks like you are simply summing the numbers and dividing by count. If that is indeed the case, please switch to a stable average[2]. See also [3].
Additionally, I tried to test the executable[4] on Windows, but there is something wrong with input. Using Windows Terminal Version: 1.24.10921.0, characters are doubled on input. Regular Vim compiled using Visual C++ does not have this issue.
When I press `:`, I get `::` in the COMMAND line. Then, every key I press gets doubled. This means I cannot `:q!`. :-)
[1]: https://github.com/garritfra/cell/blob/99b0afc7a60a871b27452...
[2]: https://www.nu42.com/2015/03/how-you-average-numbers.html
[3]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_var...
Use numerically stable algorithms for SUM and AVERAGE: https://github.com/garritfra/cell/issues/43
Keystrokes doubled in Windows Terminal: https://github.com/garritfra/cell/issues/44
Thanks!
What do you recon Excel does, floating point math for regular entries and lossless point math for currency? Or just does not rely on floats at all?
QQ: does it support programmatic cell access/modifications?
Eg `cell file.cell --write A2 "42"` or `cell file.cell --read "=SUM(A1:A10)"`? Couldn't surmise that from the glimpse I gave the README, but it would be pretty cool for scripting stuff.
I'll try to add this ASAP. :)
I'd have to look into the tools you mentioned to really understand all the details. Thanks!
I made a comment on that issue which hopefully will inform this --- I will note that while on the surface it's a great idea, the UI will be _very_ challenging and not being able to address it may make it not worth pursuing.
Alternately, maybe the correct approach would be some sort of hybrid where columns/rows can be named and then referred to using said names....
I really miss Lotus Improv, and can't afford Quantrix, and don't have the programming chops to resurrect Flexisheet, so I keep pestering folks about this, but in the meanwhile, I use pyspread....
The reason why I find your software promising is because dealing with csv in plain text is very disorienting with the inconsistent horizontal cell space. A csv-aware text editor would help a lot there with two issues in particular:
- not having to set commas manually, especially not having to count them between empty cells
- being able to navigate using h/j/k/l between cells instead of having to get creative with vim-motions on plain text
OP, if you're reading this:
I would greatly appreciate if this tool could focus on the writing experience and less with anything formula engine related, since xan is already a very performant tool for that, even at large data sets. Replacing or even competing with xan seems very difficult in my eyes, considering both tools are targeting a similar audience (rust, minimalist, and performance), which makes me think cell could focus more on the writing experience, like I said.
There are some bugs I countered right away and I'll get to open issues in due time. Thanks for making this and I hope I can replace neovim with cell for anything csv in the future!
It does not appear to support the file types I regularly work with: https://www.fda.gov/medical-devices/medical-device-reporting...
These files have a field delimiter of '|' with a line delimiter of '\r\n', as individual fields also contain '\n' characters.
I prefer visidata as the program stays running while searching and navigating through large files, making subsequent searches and filtering much faster, plus editing/writing is also supported, as well as Excel and other formats I regularly use.
Cell is very much tailored towards what you're looking for. My vision was "Excel but it's (Neo)Vim". Editing files should feel just as smooth as looking at the data. I believe Xan and Cell could actually pipe into each other quite nicely for rendering more complex data.
I'd really appreciate your time to report the bugs you encountered. Looking forward to them.
Nonetheless, I think it's an intersting discussion to put on the roadmap: https://github.com/garritfra/cell/issues/23 (RFC sketched out by AI)
Thanks!
Saved you all a search: It seems like it is similar software written in C
I will definitely try out your tool and check if it works better to me.
Two random thoughts:
- In excel I often use the dragging feature, i.e. use a formula like $A2 + B$1 and then drag it in both directions. Does your tool have something similar?
- Another nice feature are visualizations. In my tool I added a bar() function that renders a value between 0 and 1 as a bar in the cell. Not sure how flexible that is, but I did have some fun with it.
Drag-fill. Not yet, but the parts are mostly there. The formula layer already carries abs_col/abs_row through tokenization → AST → eval, so $A2 + B$1 parses correctly today; what's missing is the editing op that copies a formula across a range and shifts only the relative components. Opened #17 for it. The tricky part isn't the rewrite, it's the keybinding — Vim doesn't have an obvious idiom for "drag," so I'm leaning toward a visual-selection + fill-from-anchor key (Y is a candidate) or a :fill command. Open to suggestions if you have a feel for what works in a modal editor. It also needs to land on top of the bulk-undo work in #8/#9 so a fill is one undo step instead of N.
bar() / inline visualizations. Love it, opened #18. The interesting design call is whether BAR returns a CellValue::Visual { … } that the renderer dispatches on (correct under column resizes, but ripples into CSV export, copy/paste, and how SUM treats a visual cell), or whether it just returns a string of block-drawing chars at eval time (trivial to add, but width gets baked in at compute time which is wrong). The first is the right answer; the second is a tempting MVP. SPARKLINE(range) is the natural follow-up once the abstraction settles.
#17 — https://github.com/garritfra/cell/issues/17 #18 — https://github.com/garritfra/cell/issues/18
Better I or A, to mimick vim's multiple insert after a block selection.
To be really useful to me though (and I would imagine others), it will need to be able to at least view (but probably edit) xlsx and/or open document format spreadsheets. I know that's a huge task, but it would add immense value to the project. I'm not asking for it and I don't feel "entitled" to it (lest the inevitable replies of "add it youself" come flying in), just trying to provide some helpful feedback.
Question: is this a project you see yourself staying committed to long term? (Obviously life events happen and things change, but at least for now, do you enjoy it? Do you use it as part of your workflow? Do you feel like it's something you'll want to own long term?)
XLSX and ODS support won't be trivial, but I see the value of having it. I added it to the roadmap: https://github.com/garritfra/cell/issues/22
Regarding your question: This idea has been sitting on my todo list [1] for over 3 years now. I don't usually work with large data files in my dayjob, but occasionally working with the odd CSV on macOS frustrated me enough to put it on the list. And now that spec-driven development has matured enough to be actually useful, there's no real excuse not to build this.
I genuinely see myself caring for this long-term. I'm comfortable with the scope, and there seems to be some real interest from the community.
Really, thanks for making and sharing this; so far, I feel calm and happy when I'm using it.
Thanks for bringing this up!
This is fantastic thanks for your work
- https://www.ironcalc.com - Also found a tui interface for it - https://github.com/zaphar/sheetsui
One thing I’ve noticed in many TUI tools is that even small inconsistencies in character width or icon rendering quickly become annoying. Did you run into any tricky rendering/alignment issues while building on ratatui?
Only thing is that it would be great to have it as a vim plugin, so that after opening a .csv file or similar, you can make use of the spreadsheet tooling.
See also: https://github.com/maaslalani/sheets
I have been looking for something like this for a long time. Maybe this has some potential to become somewhat popular.