From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GF3ZKU8Y61+2dwAA0tVLHw (envelope-from ) for ; Tue, 29 Dec 2020 11:51:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gDKbJU8Y61/kKgAAbx9fmQ (envelope-from ) for ; Tue, 29 Dec 2020 11:51:43 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E7559940415 for ; Tue, 29 Dec 2020 11:51:42 +0000 (UTC) Received: from localhost ([::1]:55500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuDXR-0007Mh-TX for larch@yhetil.org; Tue, 29 Dec 2020 06:51:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuDWy-0007MW-N6 for emacs-orgmode@gnu.org; Tue, 29 Dec 2020 06:51:12 -0500 Received: from basilikum.nobis-admin.de ([89.238.71.130]:52262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuDWt-0008Vv-KA for emacs-orgmode@gnu.org; Tue, 29 Dec 2020 06:51:12 -0500 Received: from bohne (p200300cd670bea0018042895202515fa.dip0.t-ipconnect.de [IPv6:2003:cd:670b:ea00:1804:2895:2025:15fa]) by basilikum.nobis-admin.de (Postfix) with ESMTPSA id 46F3F6D81164 for ; Tue, 29 Dec 2020 12:51:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snobis.de; s=default; t=1609242661; bh=BOMITgGVH+kLSaYKNdEp5HH6u0Zk6w0PkTY7K5jOdGQ=; h=From:To:Subject:References:Date:In-Reply-To:From; b=O7Bxjf96IYXaOdgqADUffKW1BY/jYu4mmopy1COwX/il9wGFxAvPOlEhrvK21OhtL 82hXkPK2yYSQ7L4Zzz3IgoBEUPpHq/yVysMhMan81lb+C/IQsLP8tG0MK+rt2Ms9jz +MPbxaeSgy/l6MHkfpI2gkcEm2JdjDfMcZkwgL9c= From: Stefan Nobis To: emacs-orgmode@gnu.org Subject: Re: Microsoft Excel spreadsheet editing directly from within emacs. References: <69f2606a-105d-75e8-61aa-e4df82c9f445@grinta.net> Mail-Followup-To: emacs-orgmode@gnu.org Date: Tue, 29 Dec 2020 12:51:00 +0100 In-Reply-To: (Jean Louis's message of "Mon, 28 Dec 2020 23:37:36 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=89.238.71.130; envelope-from=stefan-ml@snobis.de; helo=basilikum.nobis-admin.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.03 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=snobis.de header.s=default header.b=O7Bxjf96; dmarc=pass (policy=reject) header.from=snobis.de; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: E7559940415 X-Spam-Score: -3.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: I6GNAGAjPez4 Jean Louis 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.