ledger: Improve sheet size math.
This commit is contained in:
parent
e5aa63996a
commit
6f1d01a3d4
1 changed files with 3 additions and 2 deletions
|
@ -110,7 +110,7 @@ class LedgerODS(core.BaseODS[data.Posting, data.Account]):
|
|||
# keeping the default limit conservative seems good to avoid running into
|
||||
# other limits (like the number of hyperlinks per worksheet), plus just
|
||||
# better for human organization and readability.
|
||||
SHEET_SIZE = 65000
|
||||
SHEET_SIZE = 65500
|
||||
|
||||
def __init__(self,
|
||||
start_date: datetime.date,
|
||||
|
@ -355,7 +355,8 @@ class LedgerODS(core.BaseODS[data.Posting, data.Account]):
|
|||
for account, related in self.account_groups.items()
|
||||
)
|
||||
tally_by_account = {
|
||||
account: count
|
||||
# 3 for the rows generated by start_section+end_section
|
||||
account: count + 3
|
||||
for account, count in tally_by_account_iter
|
||||
if count or account.keeps_balance()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue