This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Exporting or reporting selected ledger transactions

Tags: None
(comma "," separated)
ahagele
Registered Member
Posts
4
Karma
0
Is there a way within KMyMoney (Version 5.1.2-281f69d70) to export or report on transactions (ledger) selected manually?
E.g. I'm filtering transactions containing 'Dentist'. Then I select half a dozen of interest. Now I want to either put that in a little ad-hoc report or if that doesn't work send it to the clipboard or export as CSV.
I found out it can be sent to clip with Ctrl-C, but the format does not easily allow to further processing with a spreadsheet etc.
The only format I can see of the clipboard content looks like this

Code: Select all
----------------------------
Date: 21/04/21
Payee: LUMINO AUCKLAND CENTRAL
Amount: $301.00
Memo: AUCKLAND
----------------------------
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS
Have you looked at the full range of possible options for filtering a report? You can easily select the accounts and/or categories of interest, and it sounds like a date filter might be able to get at least close to the set of transactions you are interested int. With the format you show above, my approach would be to write a short script (perl, python, ruby, ....) to convert it into a more usable csv. I don't know if there is already a wishlist bug for copy/pasting to the clipboard in a more usable format, but it's something else to think about.
ahagele
Registered Member
Posts
4
Karma
0
Thanks for those ideas. I've used the reporting feature and it's pretty flexible. However if I'm in the ledger and looking at something there it's awkward to jump over to reports and try to remember the filter details.
Yes, I thought about making a little script to format the clipboard. Doing that conversion on the clipboard (without going via files) might require a bit more.
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS
I just looked and there are several perl CPAN modules for dealing with the clipboard, so you can go directly without needing to manually save to a file first. I assume the same is true for other scripting languages.

Additional minor note: in 5.1 multiple transactions selected in the ledger are all copied to the clipboard in the format you show. In master, it seems only the category of the first transaction selected currently gets copied to the clipboard.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]