Luc,

First of all, as discussed, you're wanting to enter all the future transactions 
today, rather than each month in the future. This is fine and all, and in fact, 
the import process can work either way. Also I note that "the future" is just 
an initial value problem, in that someone might be entering payments for the 
past 60 months rather than some future 60 months--the process is the same, but 
the initial value (starting date) is different.

This situation can be divided into two components:

1. Creating the CSV file
2. Importing the data.

The workflow will be create the CSV file and then import it, but creating the 
CSV is based on being able to import it.

So I'm going to mainly focus on the first step, creating the CSV file. However, 
please know that my focus on creating the CSV file is forward looking, in that 
I realize there is the second step. 

A spreadsheet is suited for much of the CSV file creation work.

When I create a new CSV file, I start with my template, which is just some 
headings on the columns. For this example, I'm going with the basics:

date,description,notes,memo,account,dramt,cramt

Well, ok that's a bit more than the basics, but the above is my basic headings. 
I'm going to trim that down more.

date,description,account,amount

Now I need to decide how I want to import these, or, alternatively do I want to 
import everything at once. There is much ambiguity in what the actual journal 
entries would look like, especially since we're not talking about regulated 
activity. If it's regulated, hire an accountant.

So now that we have the column headings, let's move forward to the date.

"100€ of income each month from 2026-09-01 to 2028-12-31 from Work 1"

This is a bit ambiguous, as we don't know if it's prepay, but I will make the 
assumption that the work is paid on the first of every month in advance. 
September 1, 2026 is the first payment and December 1, 2028 is the last payment.

12 months in a year times two, plus 4 in 2026 = 28 months.

Row 1 has the headers above.
Thus in cell A2, I enter the dates: 
=DATE(2026, SEQUENCE(28)+8, 1)
The 8 is the offset from January=1, so +8 for September.
That creates all the dates. Format the dates using the format painter.
In B2 some nice description: "Work 1 monthly income"
In C2 the GnuCash account, such as: Income:Salary:Work 1
In D2 enter the amount: 100.00

All payments are equal, so now how to copy B2 down is the question.
For this example, just highlight B2:D2, copy, and then paste in 
B3:B29

Export as CSV using "Save as"... "CSV" (in the drop down menu).

This file is not multi-split, since all the journal entries are simple (1 debit 
& 1 credit).

IMPORTANT: Import this file now, so that you have both the account & transfer 
account listed. Some of the others might all involve a common account, but 
maybe not. Multi-split can handle the entire import in one file, but for this 
example just import the above,. and save the import settings to make your life 
easier in the future.

I'm going to skip over the next few, as they're basically the same as above.

"50€ of income each month from 2029-01-01 for as long as possible from 
Retirement"

This is only interesting as you're pushing some limit. I'm going to interpret 
the limit as life expectancy, as both spreadsheets and GnuCash have much 
greater capacity in terms of "as long as possible." 

In B2 enter
=DATE(2029, SEQUENCE(SOME VERY LARGE NUMBER), 1)
For 30 years starting January 1, 2029:
=DATE(2029, SEQUENCE(360), 1)

Again, 30 years worth of months in with a few keystrokes, plus the format 
painting.

Then follow the rest of the above process. Of course there are limits, but, 
loosely, there is no limit in terms of GnuCash or the spreadsheet capability.

"Car 2 amortization reduces linearly each month from 540€ to 0€ over 5 years 
starting 2025-01-01 (i.e. 540€, 525€, 510€… 45€, 30€, 15€, 0€)"

Same as above. The "amortization" expense is $9 per month. So just put the 
dates in using the formula above (5 years = 60 months, so =DATE(2025, 
SEQUENCE(60), 1), write the description, 9.00 amount, and pick the correct 
account.

There is this one that MIGHT BE a bit different than the others:

"House loan 80€ each month for the next 6 years"

It's not clear if this is income or expense, but either way, there is probably 
P&I involved. This is where the multi-split comes in handy. I'm saving that for 
after you work on the first one, the 100 in income each month from 2026-09-01 
top 2028-12-31.

Also, I want to note that much of the above could be improved. The way I 
authored the copy above was a hard copy. This works fine, and most people 
understand such, but your workflow will get much better with a relative copy.

With a bit of optimization, one can import hundreds/thousands of transactions 
with only a few clicks and keystrokes.


 
> On 09/14/2026 2:44 PM PDT Luc Maisonobe <[email protected]> wrote:
> 
>  
> Hi all
> 
> During a discussion on a Gnucash feature request on bugzilla, the
> discussion shifted to multi-split CSV import. In order to help me
> understand, I asked for more explanations and more importantly for an
> example of use.
> 
> So for the benefit of all users, here is a made-up case, where I assume
> the transactions below have somehow been computed beforehand by an
> external tool (spreadsheet, Python script, whatever) and I want to
> import these transactions.
> 
> Let's say I have this hierarchy of accounts:
> 
> - Income
>     - Salary
>        - Work 1
>        - Work 2
>        - Retirement
> - Assets
>     - Cars
>        - Car 1
>           - Buy
>           - Amortization
>           - Resell
>        - Car 2
>           - Buy
>           - Amortization
>           - Resell
> - Expenses
>     - Utilities
>        - Electric
> - Liabilities
>     - House
> 
> Then say that I want to import these transactions (all these numbers
> are fake, of course), using ISO8601 date format:
> 
> - 100€ of income each month from 2026-09-01 to 2028-12-31 from Work 1
> - 10€ of income once a year from 2026-06-01 to 2030-12-31 from Work 2
> - single 2000€ regularization income on 2029-01-01 when leaving Work 1
> - 50€ of income each month from 2029-01-01 for as long as possible from
> Retirement
> - Consider Car 1 amortization is finished (I left it only to have two
> accounts with the same name)
> - Resell Car 1 for 250€ on 2027-10-15
> - Car 2 amortization reduces linearly each month from 540€ to 0€ over 5
> years starting 2025-01-01 (i.e. 540€, 525€, 510€… 45€, 30€, 15€, 0€)
> - Electric bill 30€ each month
> - House loan 80€ each month for the next 6 years
> 
> 
> The question is: how do I use multi-split CSV import to import these
> transactions, or in other words how do I set up my external tool so it
> creates a CSV file that gnucash could import?
> 
> best regards,
> Luc 
> _______________________________________________
> gnucash-user mailing list
> [email protected]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
_______________________________________________
gnucash-user mailing list
[email protected]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to