<?lsmb FOREACH column IN columns ?><?lsmb IF heading.$column.text; heading.$column.text; ELSE; heading.$column; END ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
<?lsmb FOREACH row IN rows ?><?lsmb FOREACH column IN columns ?><?lsmb IF row.$column.text; row.$column.text; ELSIF column == 'accno'; accs = []; FOREACH account IN row.accno; accs.push(account.text); END; accs.join(':'); ELSE; row.$column; END ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
<?lsmb END ?><?lsmb FOREACH column IN columns ?><?lsmb totals.$column ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
