reddit / emacs
What is the best spreadsheet mode in emacs?
LowCom · 2022-04-30 14:22
I have always been looking for a text based spreadsheet where I can use my familiar keyboard bindings.
I have tried out ses-mode and org-tables but they both seem to have some issues. Which one do you people use?
JohnathanDee · 2022-04-30 14:26
I use org tables, but yah it's pretty clunky. Can come in very handy tho
thevoidzero · 2022-04-30 14:39
I use org-table for manual and small tables I need quick calculations on. Something that I can directly put on my reports, but if it's a table that I'll only put the summary of as the calculations are way complex or I have way too much data, I just keep it in csv and load it in pandas or R dataframe and do the work there.
LowCom · 2022-04-30 14:50
How do you use pandas as a spreadsheet interface? How do you visualise the data or grid?
thevoidzero · 2022-04-30 14:54
I don't. Sorry if it was confusing, I don't use spreadsheets style if it's too long or too wide. I just have it in memory as a dataframe and do my operations on it through code. I only look at the output of the code for things I want, mostly the top rows or the summary.
Edit:
I also use gnuplot to plot the data and visualize it for long tables, basically I don't try to have numbers displayed if it's just too much. So it works well in org-mode as you can do all that.
Zinjanthr0pus · 2022-04-30 15:02
I've used csv-mode, but it definitely felt kinda barebones. I agree that emacs key bindings would be really amazing when working with spreadsheets. I suppose exwm is an option
HumanBrainMapper · 2022-04-30 15:25
Just curious: if you are already working with (and have your data loaded in) pandas or R, why would you use yet another tool for graphing and not just use matplotlib or ggplot for example?
LowCom · 2022-04-30 16:01
Can you export org tables to csv for further processing by some other program?
HumanBrainMapper · 2022-04-30 17:04
org-table-export
velbunadur · 2022-04-30 17:14
I haven't used it myself but I know of [dismal.](https://acs.ist.psu.edu/projects/dismal/dismal.html) It has even been used for [cognitive science research.](https://www.semanticscholar.org/paper/Dismal%3A-A-spreadsheet-for-sequential-data-analysis-Ritter-Wood/af43468c7835c7cdbe328738e6bc6acaf97ad5d4)
thevoidzero · 2022-04-30 17:55
Oh I also use those, but I use gnuplot more often then those. If I already have it in python I'll use matplotlib and if I already have it in R then I'll use ggplot. But if it's in csv, or is a org table then I mostly just plot it using gnuplot instead of loading it in dataframe. And also for exports and finalized data I save them in csv and just run gnuplot since it gives me finer control for plotting and I'm not that good in ggplot as in gnuplot yet.
Another reason being if the data is huge gnuplot performs well compared to the other two which I'll close as soon as I'm done processing and exporting the results in a csv.
thevoidzero · 2022-04-30 17:57
as the other comment says you can do export on table and export it as csv, tsv, latex, etc. There could be more but I only use those, and it gives the option automatically looking at export file extension so I haven't looked at all the possible exports.
Also, if you mean just python, R and gnuplot as other program then you don't have to export the csv, as you can name the table and pass them as input for the code blocks in the org itself, so you can plot/process from the same file.
xtifr · 2022-04-30 18:41
Might want to check out Gnu Oleo. It's a standalone text-mode spreadsheet from Gnu that (like many Gnu projects) uses Emacs-ish keybindings.
HumanBrainMapper · 2022-04-30 19:37
Thank you for your answer.
XCapitan_1 · 2022-04-30 20:00
I occasionally use csv-mode when I need to inspect some dataframe-ish output. It's pretty usable with `csv-align-mode`.
Thaodan · 2022-04-30 20:13
I also use org-tables. I use it because it is pretty easy to use and extend if necessary.
Also it fits good into my existing workflow.
Zinjanthr0pus · 2022-04-30 20:21
Yeah, I mean it definitely has capabilities, i think you can maybe even do some math with it (though it's been a while). You can also use rectangle operations to work on like a whole column iirc.
ThatThinkingFeeling · 2022-04-30 21:35
Not based on emacs, but https://www.visidata.org/ is really neat.
telenieko · 2022-04-30 22:18
Oleo has been discontinued for 21 years!
LowCom · 2022-05-01 00:58
How do you name the table?
xtifr · 2022-05-01 03:23
Oh. Whoops. Sorry.
In my defense, the official Gnu webpage for Oleo gives no indication that it's anything other than an active project. And since Gnu itself is still active...
thevoidzero · 2022-05-01 05:39
Sorry didn't see the notification, but basically this:
Also, I suggest you go over [the org manual](https://orgmode.org/manual/Tables.html) I discover a lot of things when I read it sometimes.
#+name:table-1
| what | this |
|------+------|
| a | 1 |
| b | 2 |
| c | 3 |
#+begin_src R :var data=table-1
data$this^2
#+end_src
#+RESULTS[b50419a0f7c40928017cc7007befc23b1c86a208]:
| 1 |
| 4 |
| 9 |
washy99999 · 2022-05-01 07:18
agreed!
ThatThinkingFeeling · 2022-05-01 12:40
I should add that visidata does not label itself as a "spreadsheet" application in the Excel sense. However it's great for many use cases involving loading data from various sources and doing analysis, transformation, joins etc. In some ways it's "emacs for tabular data".
simbledress · 2022-05-07 12:30
Honourable mention: [ess-view-data](https://github.com/ShuguangSun/ess-view-data) (since someone mentioned Visidata). It seems to lack a way to edit a cell, but that shouldn't be too hard to add.
linwaytin · 2022-06-01 13:07
I think `cell-mode` should be mentioned.
https://gitlab.com/dto/cell-mode