Hi Rainer,

On Sep 27, 2008, at 4:20 PM, Rainer Thiel wrote:

Hi Carsten,

2008/9/27 Carsten Dominik <[EMAIL PROTECTED]>:
The other thing you can do is to use your own format to convert the number. Maybe something like "%.2f" will work for you? Hard to make this correct
for the general case though.

Yes, this is not a way to go, as far as I can see, for exactly that reason.

I agree.



Interestingly,

|  12130.68 |
|  -1444.19 |
| -12744.90 |
|   -186.00 |
|   7000.00 |
|  -7056.00 |
|   -335.58 |
|   -277.00 |
|  -2912.99 |
#+TBLFM: @[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@8$1

gives the correct value, there's no need to add `;f2' at the end of
the last line.

Yes, calc has its own rules for formatting numbers


This in itself is a way to go, of course, but would be
more comfortable to have a way to sum up all rows but the last one
(without having to keep track of the number of rows) or at least to
work with ranges, which as far as I have seen so far seems not to be
possible in this case.

Check out the manual section about the spreadsheet, and the corresponding tutorial on worg. A lot can be done with that, and there are ranges between row numbers or between horizontal lines. In your example:


|  12130.68 |
|  -1444.19 |
| -12744.90 |
|   -186.00 |
|   7000.00 |
|  -7056.00 |
|   -335.58 |
|   -277.00 |
|  -2912.99 |
#+TBLFM: @9$1=vsum(@[EMAIL PROTECTED])

Or much better:

|-----------|
|  12130.68 |
|  -1444.19 |
| -12744.90 |
|   -186.00 |
|   7000.00 |
|  -7056.00 |
|   -335.58 |
|   -277.00 |
|-----------|
|  -2912.99 |
#+TBLFM: @9$1=vsum(@[EMAIL PROTECTED])

Add new line with M-S-down, so that the absolute reference to the last row will automatically be shifted.

org-table-sum is an old hack, from before the existence of the spreadsheet functions. I still use I, but only occasionally, not for anything I need to change and recompute.




These are minutiae, of course.  org-mode is already excellent, and
since I discovered it a few weeks ago, I've been making use of it at
all times.

Good to know.

- Carsten



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to