From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Baumann Subject: Re: spreadsheet in org Date: Mon, 08 Sep 2008 10:03:11 +0200 Message-ID: References: <1h1vzv1pnr.fsf@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcbiY-0007Wj-BH for emacs-orgmode@gnu.org; Mon, 08 Sep 2008 04:03:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcbiX-0007WX-Si for emacs-orgmode@gnu.org; Mon, 08 Sep 2008 04:03:26 -0400 Received: from [199.232.76.173] (port=36071 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcbiX-0007WU-Q6 for emacs-orgmode@gnu.org; Mon, 08 Sep 2008 04:03:25 -0400 Received: from mx20.gnu.org ([199.232.41.8]:46059) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcbiX-0007WZ-4s for emacs-orgmode@gnu.org; Mon, 08 Sep 2008 04:03:25 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcbiV-000254-Js for emacs-orgmode@gnu.org; Mon, 08 Sep 2008 04:03:23 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KcbiQ-0000uM-Gw for emacs-orgmode@gnu.org; Mon, 08 Sep 2008 08:03:18 +0000 Received: from p54965380.dip.t-dialin.net ([84.150.83.128]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Sep 2008 08:03:18 +0000 Received: from dtbaumann by p54965380.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Sep 2008 08:03:18 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Richard G Riley writes: > Here is a straightforward spreadsheet: > > > * Test org-mode spreadsheet for cash books > > > | | Name | Cash | > |---+------------------+----------------| > | _ | | cashforward | > | | | 68000 | > | _ | | cashtake | > | | cash takings | 2340 | > | _ | | cashbank | > | | moved to bank | 2000 | > |---+------------------+----------------| > | _ | | cash | > | # | subtotal | 68340 | > |---+------------------+----------------| > | | emp1 | 315 | > | | emp2 | 289 | > | | | 0 | > | | | 0 | > |---+------------------+----------------| > | _ | | wages | > | # | total wages | 604 | > |---+------------------+----------------| > | _ | | cashafterwages | > | # | Cash After Wages | 67736 | > |---+------------------+----------------| > #+TBLFM: $cash=$cashforward+$cashtake-$cashbank::$cashafterwages=$cash-$wages::$wages=vsum(@10$3..@13$3) > > My questions are: > Can one not actually name a specific cell? Or must the name itself be > stored above or below the cell? C-c' gives you a nice interface to the table formulas, making names almost obsolete > The wages field : how to generalise this to allow for rows to be > added/deleted in the emp1,emp2 block? $wages = vsum(@-I..@-II) will do the trick (sum between hlines) apart from that, if you add rows using M-S-down your formulas will be adjusted automatically. > Or is there a totally better way to do this? I didnt see a way for all > fields to auto calculate when a certain field was changed. One has to > tab over the "#" in the left hand column. Or? As the manual says: C-u C-c * you might also want to look at the Tbl menu > Oh yes, can one change the enter mode so that the field only edits if > you press enter first? And then it preselects the previous contents so a > single key other than cursor keys will wipe the previous contents? > Currently if I type "5" in the wages field above then, depending where > the cursor is, I get (for example) 6504. The interface is already outstandingly smart: Try moving with the TAB from one field to another or use enter to stay inside the column. You will notice that the requested features are already present. Maybe, also try another couple of spreadsheets :-) Thomas