From: Stefan Nobis <stefan-ml@snobis.de>
To: emacs-orgmode@gnu.org
Subject: Re: Microsoft Excel spreadsheet editing directly from within emacs.
Date: Tue, 29 Dec 2020 12:51:00 +0100 [thread overview]
Message-ID: <m14kk4u8yj.fsf@nobis-it.eu> (raw)
In-Reply-To: <X+pCEJz04w2AJQVO@protected.rcdrun.com> (Jean Louis's message of "Mon, 28 Dec 2020 23:37:36 +0300")
Jean Louis <bugs@gnu.support> writes:
> I find Org tables useful for small reports. Just as table mode is
> also useful within Emacs. Org tables are primitives that are not
> comparable to spreadsheet software.
It might be a difficult question, whether Org tables are the best
solution in a given situation or whether it is the best interchange
format to use with arbitrary people (but I also doubt that MS Excel is
a good way - I have seen really nasty and expensive problems caused by
the use of Excel to move data around).
But Org tables are very powerful and in many cases even far superior
than most other spreadsheet software (especially MS Excel - I can't
count the number of times that Excel tried to be smart and made a
total mess of my data).
Here is a short example of what is possible with Org tables:
#+begin_src org
,* Org Spreadsheet
,** Example from the Manual
See [[https://orgmode.org/manual/Advanced-features.html#Advanced-features][The Spreadsheet - Advanced features]].
|---+-------------+---+-----+--------------------------------------|
| | Func | n | x | Result |
|---+-------------+---+-----+--------------------------------------|
| # | exp(x) | 1 | x | 1 + x |
| # | exp(x) | 2 | x | 1 + x + x^2 / 2 |
| # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 |
| # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
| # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 |
| * | tan(x) | 3 | x | x pi / 180 + 5.72e-8 x^3 pi^3 |
|---+-------------+---+-----+--------------------------------------|
,#+TBLFM: $5=taylor($2,$4,$3);n3
,** Even symbolic math
|-------------+----------------------------+---------------------------|
| Func | Derivative | Integral (over [a, b]) |
|-------------+----------------------------+---------------------------|
| x^2 | 2 x | x^3 / 3 |
| exp(x^2) | 2 x exp(x^2) | erf(i x) sqrt(pi) / (2 i) |
| ln(x^2) | 2 / x | 2 x ln(x) - 2 x |
| sqrt(x) | 0.5 / sqrt(x) | 2:3 sqrt(x^3) |
| 2x + sin(y) | 2 | x^2 + x sin(y) |
| sin(1/x) | cos(1 / x) pi / (-180 x^2) | integ(sin(1 / x), x) |
|-------------+----------------------------+---------------------------|
,#+TBLFM: $2=deriv($1, x);S::$3=integ($1, x);S
,** Combine data from different tables
,*** Some special expenses
,#+NAME: tab-special
| Position | Amount |
|------------------+--------|
| Abo part 1 | 299.22 |
| Abo part 2 | 299.22 |
| Some random item | 210.83 |
|------------------+--------|
| Sum | 809.27 |
,#+TBLFM: @>$2=vsum(@I..II)
,*** Tax calculation for my room
,#+NAME: tab-room
| | Position | Amount |
|---+----------------------------+----------|
| | Area Room | 11.00 |
| | Area Flat | 77.42 |
| | Costs per year | 12000.00 |
| | Some insurance | 300.00 |
| | Electricity | 700.00 |
|---+----------------------------+----------|
| _ | | A |
| | Area fraction | 0.14208 |
| | tax-deductible Rent | 1747.58 |
| | tax-deductible Electricity | 99.46 |
,#+TBLFM: $A=@2$3/@3$3;%.5f::@>>$3=$A*@4$3+$A*@5$3;%.2f::@>$3=$A*@6$3;%.2f
,*** Summary
,#+NAME: tab-summary
| Position | Amount | Comment |
|------------------------+---------+---------------------|
| Special costs | 809.27 | |
| Deductible Rent | 1747.58 | put in form field A |
| Deductible Electricity | 99.46 | put in form field B |
| Something else | 1234.56 | very special |
|------------------------+---------+---------------------|
| Sum | 3890.87 | |
,#+TBLFM: @2$2=remote(tab-special,@>$2)
,#+TBLFM: @3$2=remote(tab-room,@>>$3)
,#+TBLFM: @4$2=remote(tab-room,@>$3)
,#+TBLFM: @>$2=vsum(@I..II)
#+end_src
In respect to core features (listing data, using formulas for
calculation) I doubt that Emacs with Org tables and Calc is missing
anything. Maybe advanced visual presentation of the data is easier
with GUI Spreadsheets -- then again, it is so easy to combine Org
tables with the power of Gnuplot, R, Python, Julia, TeX etc. to create
astonishing visuals, that I prefer this way in many situations.
From my point of view, MS Excel is the toy (I have not too much
experience with the other GUI spreadsheet programs). In Emacs I have
the power of Calc (a complete computer algebra system) and Lisp (the
best programming language, even if Elisp is not Common Lisp) at my
fingertips. And Emacs tries not to outsmart me and says: Hey, over
there in line 67 - that could be interpreted as a date, even if most
other data in that column looks quite different; let me just format
everything as a date for you. And Microsoft says that due to
backwards-compatiblity this brain dead behaviour (together with many
other nasty bugs) will never ever be fixed.
> Spreadsheet is more or less intuitive, Org mode tables are not, so
> comparison is hard.
Just the other way around! :)
I love that Org tables are fully self-explained, everything is
explicit and quite obvious. Formulas are easy to inspect. GUI
Spreadsheets may be a bit easier for the very first steps, but they
hide sooo much, that even power users with a decade or two of
experience have trouble of holding everything together.
Are Org tables for everyone? It would be great and IMHO it could work,
but it will not happen in the foreseeable future.
Are Org tables the solution for everything? Of course not.
But they are *very* powerful and Emacs + Org + Calc is able to replace
Spreadsheets in many situation and that solution may even be superior
in the long run.
--
Until the next mail...,
Stefan.
next prev parent reply other threads:[~2020-12-29 11:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 15:18 Microsoft Excel spreadsheet editing directly from within emacs Hongyi Zhao
2020-12-28 16:21 ` Daniel Martín
2020-12-28 16:51 ` Stefan Monnier
2020-12-28 17:39 ` Filipp Gunbin
2020-12-28 19:47 ` Jean Louis
2020-12-28 21:06 ` Uwe Brauer
2020-12-29 7:32 ` Jean Louis
2020-12-29 15:36 ` Uwe Brauer
2020-12-28 19:36 ` Jean Louis
2020-12-28 19:55 ` Daniele Nicolodi
2020-12-28 20:37 ` Jean Louis
2020-12-29 11:51 ` Stefan Nobis [this message]
2020-12-29 13:41 ` Eric S Fraga
2020-12-30 22:19 ` Jean Louis
2020-12-31 12:17 ` Stefan Nobis
2021-01-02 0:48 ` Samuel Wales
2020-12-29 0:06 ` andres.ramirez
2020-12-29 2:29 ` Carson Chittom
2020-12-28 20:12 ` Uwe Brauer
2020-12-29 10:07 ` Eric S Fraga
2020-12-29 4:02 ` Robert Thorpe
2020-12-29 4:53 ` Hongyi Zhao
2020-12-29 7:49 ` Jean Louis
2020-12-29 14:47 ` Hongyi Zhao
2020-12-29 14:59 ` Greg Minshall
2020-12-29 15:34 ` Jean Louis
2020-12-29 17:54 ` Robert Thorpe
2020-12-29 23:39 ` Hongyi Zhao
2020-12-30 3:06 ` Robert Thorpe
2021-01-08 14:07 ` H. Dieter Wilhelm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m14kk4u8yj.fsf@nobis-it.eu \
--to=stefan-ml@snobis.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).