diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-01-10 11:26:14 -0500 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2013-02-18 14:08:46 -0500 |
commit | 9fcdfc893c41447099169bf4ad51f5856db399a1 (patch) | |
tree | 5fb14d033986ada2425a86661b026cc7ca29f298 /contrib | |
parent | 8ebb54638ca8a57b15126cb11fd6329faf639be5 (diff) | |
download | fork-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')
-rwxr-xr-x | contrib/non-profit-audit-reports/csv2ods.py | 5 |
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', '') |