forked from T0ha/ezodf
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathIDEAS.txt
60 lines (39 loc) · 1.19 KB
/
IDEAS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
IDEAS
=====
Spreadsheet
-----------
NumericalHarvester
~~~~~~~~~~~~~~~~~~
Collect numerical values from spreadsheets/tables as array.array() or
numpy.array() objects.
ignores following cell value types by intention:
- date
- time
- string
- boolean
options:
- replace ignored values by a default value
- ignore float/percentage/currency
- ignore hidden data
- ignore incomplete rows/columns
- autodetect harvest ranges
FormulaBuilder
~~~~~~~~~~~~~~
from tableutils import cref, cfunc
cref('A1') => ".A1"
cref('A1', 'Sheet2') => "Sheet2.A1"
cref('A1', 'Sheet Two') => "'Sheet Two'.A1"
A1 = cref('A1', 'Sheet2')
A10 = cref('A10', 'Sheet2')
crange = "[{0}:{1}]".format(A1, A10)
fstr = "of:=%s" % cfunc('SUM', crange, '[.B1]', '[.B2]')
=> "of:=SUM([Sheet2.A1:Sheet2.A10];[.B1];[.B2])"
cref: ok, for sheetnames with and without spaces
cfunc: NOT necessary, write a good tutorial for formula writing
Variables and User Fields handling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Look spec v1.2 pp 139 - 144
from ezodf import opendocument
doc = opendocument('PATH')
doc.vars.simple['varname'] = u"AnyData"
doc.vars.user_field['varname'] = u"AnyData"