A shop deposit, from Sheets to GnuCash
bulldo.gs · https://bulldo.gs/demos/etsy-deposit-window/

This fictional USD practice book starts with five empty posting accounts. Two
sales, a fee and a refund leave $80.50 in the shop's clearing account. The
payout moves those dollars to its bank. The two imports let you see each stage.

1. Open a practice copy

Unzip the whole folder. Open start-here.gnucash in GnuCash and use File → Save
As to give your copy a new name. On the Accounts tab, expand Assets, Expenses
and Income. All five balances begin at zero. Keep the original empty book for
another run.

2. Enter the shop activity

Choose File → Import → Import Transactions from CSV. Choose 01-activity.csv.
In Import Preview, select the “GnuCash Export Format” preset. Use the current
5.x preset. Check that the comma separator, Multi-split, the y-m-d date format
and one skipped heading line are selected. The eight split lines make four
balanced transactions. Continue through account mapping. Each source and
destination account name should match. Check that all four entries on Match
Transactions say “New, already balanced”, then choose Apply. Save your copy.

Sales are 12.50 + 80.00 = 92.50. Refunds offset income by 8.00. Fees are 4.00.
Assets:Etsy clearing holds 80.50, and Assets:Bank is still zero. GnuCash may
show income with the opposite sign in an individual split. The Accounts tree
shows net income of 84.50 before fees.

3. Enter the payout

Run the same assistant with 02-payout.csv and select the same preset. Check
that both account names match and exactly one new balanced transaction is
listed. Apply and save. Assets:Bank now holds 80.50. Assets:Etsy clearing is
zero. Sales, refunds and fees retain their earlier amounts. Another deposit
entered as a sale would incorrectly raise the income figure.

4. Try the Google Sheets staging example

The CSV inputs above are ready to import. To reproduce them from the fictional
statement, import staging.csv into a private Google Sheet and name the tab
Staging. Column A contains a text identifier. Each accepted row needs its own
32-character lowercase hexadecimal ID. Use positive USD magnitudes. The Kind
column determines the two posting accounts and signs.

Under Extensions → Apps Script, paste shop-ledger.gs into the sheet's bound
project and save. On separate otherwise-empty tabs enter one formula per tab:

  =SHOP_LEDGER(Staging!A2:E7,"review")
  =SHOP_LEDGER(Staging!A2:E7,"activity")
  =SHOP_LEDGER(Staging!A2:E7,"payout")

If your sheet uses semicolons between formula arguments, use that separator.
The review tab lists the unexplained statement line. Its kind needs a decision
and its “--” amount needs a source. The row stays out of both import files
until you can classify it and verify an amount. The example omits the previous
payout's sale and the sale that clears after this sample payout.

Inspect the two posting tabs before exporting each through File → Download →
Comma-separated values (.csv). The sample has eight split rows in activity
and two in payout. To repeat the exercise with those exports, start from a
fresh copy of the empty book. Each input identifier is repeated for the two
sides of its single transaction.

This is a single-currency teaching example with four explicit row categories.
Compare real statement columns and signed amounts with your own records before
mapping a shop. Reserve holds, currency exchange and tax postings need their
own treatment. The practice function reads its input range. It sends nothing.

GnuCash's step-by-step CSV tutorial:
https://wiki.gnucash.org/wiki/Guided_CSV_Import
GnuCash's transaction import manual:
https://www.gnucash.org/docs/v5/C/gnucash-manual/trans-import.html
