From 6f1d01a3d494ad90c8bfbac42ae6b36491972ad8 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Fri, 17 Jul 2020 11:00:33 -0400 Subject: [PATCH] ledger: Improve sheet size math. --- conservancy_beancount/reports/ledger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conservancy_beancount/reports/ledger.py b/conservancy_beancount/reports/ledger.py index e83eae4..7ffbb39 100644 --- a/conservancy_beancount/reports/ledger.py +++ b/conservancy_beancount/reports/ledger.py @@ -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() }