summaryrefslogtreecommitdiff
path: root/contrib/non-profit-audit-reports
diff options
context:
space:
mode:
authorBradley M. Kuhn <bkuhn@ebb.org>2013-01-10 11:26:14 -0500
committerBradley M. Kuhn <bkuhn@ebb.org>2013-02-18 14:08:46 -0500
commit9fcdfc893c41447099169bf4ad51f5856db399a1 (patch)
tree5fb14d033986ada2425a86661b026cc7ca29f298 /contrib/non-profit-audit-reports
parent8ebb54638ca8a57b15126cb11fd6329faf639be5 (diff)
downloadfork-ledger-9fcdfc893c41447099169bf4ad51f5856db399a1.tar.gz
fork-ledger-9fcdfc893c41447099169bf4ad51f5856db399a1.tar.bz2
fork-ledger-9fcdfc893c41447099169bf4ad51f5856db399a1.zip
Support for title: field, to name sheets in the ODS file.
If "title:SOMETHING" occurs in the CSV file, use SOMETHING as the title of the sheet.
Diffstat (limited to 'contrib/non-profit-audit-reports')
-rwxr-xr-xcontrib/non-profit-audit-reports/csv2ods.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/non-profit-audit-reports/csv2ods.py b/contrib/non-profit-audit-reports/csv2ods.py
index 7dd840c8..6aabcb59 100755
--- a/contrib/non-profit-audit-reports/csv2ods.py
+++ b/contrib/non-profit-audit-reports/csv2ods.py
@@ -169,7 +169,10 @@ def csv2ods(csvname, odsname, encoding='', singleFileDirectory=None, knownChecks
if val == "pagebreak":
doc.sheets[doc.sheet_index].set_sheet_config(('row', row), style_pagebreak)
else:
- doc.set_cell_value(col + 1, row, 'string', val)
+ if val[0:6] == "title:":
+ doc.sheets[doc.sheet_index].set_name(val[6:])
+ else:
+ doc.set_cell_value(col + 1, row, 'string', val)
else:
# enter an empty string for blank lines
doc.set_cell_value(1, row, 'string', '')