>>> "UB" == Uwe Brauer <o...@mat.ucm.es> writes: >> On Monday, 4 Jan 2021 at 21:01, Uwe Brauer wrote:
>> Yes. >> Sorry I was brief: I cut and pasted something from one of my files while >> in a rush! >> Basically, you could do: >> #+begin_src ledger :cmdline -V --format "%-20A %14T\n" bal --flat assets >> 2010/01/01 * Starting balance >> assets:bank:savings 1300.00 >> income:starting balances >> 2010/07/22 * Got paid >> assets:bank:chequing 1000.00 >> income:salary >> #+end_src >> and you would get, as output, > But I rather prefer to have > | 340 | expenses | | | > | 170 | | BigBrother | | > | 150 | | | Jacket | > | 20 | | | Shoes | > | 170 | | Brother | | > | 130 | | | BigBrother | > | 40 | | | ChristmasTree | > | -340 | income | | | > | -170 | | BigBrother:Card | | > | -170 | | Brother:Card | | > | | | | | > |------+----------+-----------------+---------------| > | 0 | | | | > Any idea how to achieve this? Well 10 years ago Eric Schulte posted this https://lists.gnu.org/archive/html/emacs-orgmode/2010-08/msg00502.html #+name: test #+begin_src ledger 2010/01/01 * Starting balance assets:bank:savings 0 income:starting balances 2010/07/23 ChristmasTree expenses:Brother:ChristmasTree 40.00 income:Brother:Card 2010/07/24 Jacket expenses:BigBrother:Jacket 150.00 income:BigBrother:Card 2010/07/24 Schuhe expenses:BigBrother:Shoes 20 income:BigBrother:Card 2010/07/23 BigBrother expenses:Brother:BigBrother 130 income:Brother:Card #+end_src #+begin_src emacs-lisp :var ledger=test (with-temp-buffer (insert ledger) (message ledger) (org-table-convert-region (point-min) (point-max) 2) (org-table-to-lisp)) #+end_src #+RESULTS: | 340 | expenses | | 170 | BigBrother | | 150 | Jacket | | 20 | Shoes | | 170 | Brother | | 130 | BigBrother | | 40 | ChristmasTree | | -340 | income | | -170 | BigBrother:Card | | -170 | Brother:Card | | -------------------- | | | 0 | | It is not precisely what I want, but not bad either. If somebody can come up with a better solution.......