[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: dates in a spreadsheet
From: |
Bernt Hansen |
Subject: |
[Orgmode] Re: dates in a spreadsheet |
Date: |
Wed, 17 Mar 2010 18:39:43 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Josh Mattoon <address@hidden> writes:
> Hey Nick, the first one came through just fine. This is pretty cool but still
> not quite what I'm looking for. It totally helped me get what I wanted
> though! I wanted to have a separate row for each day
> so I could fill in activities. Modifying your example I get:
>
> | date | place | activity | notes |
> |------------------+---------+---------------------------+------------------|
> | <2010-03-19 Fri> | | | dummy |
> | <2010-03-20 Sat> | | | |
> | <2010-03-21 Sun> | moon | collect rocks | |
> | <2010-03-22 Mon> | jupiter | thrash around the red dot | |
> | <2010-03-23 Tue> | mars | see the little green men | |
> | <2010-03-24 Wed> | earth | | home, sweet home |
> #+TBLFM: @2$1 = <03-19-2010>::$1 = @-1$1 + 1
>
> Exactly what I wanted! I can insert days, move them around, and just hit C-u
> C-c C-c to have it update. I'd like to understand how it works though, if
> you don't mind. What does the ::$1 synax mean? And
> how did it know that we were dealing with a date?
As I understand it
This is a formula line with 2 formulas in it. The formulas are
separated by the ::
@2$1 = <03-19-2010> sets the cell at row 2, column 1 to Mar 19, 2010
Then the next formula just calculates all of the values for column 1
leaving the static entry previously defined alone.
$1 = @-1$1 + 1 column 1 entries are the previous row for column 1 plus 1
so it just adds 1 to the initial value of the date for each following
row in your table.
HTH,
Bernt