/usr/share/doc/python-ooolib/examples/calc-example01.py is in python-ooolib 0.0.17-2.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/python
import sys
sys.path.append('..')
import ooolib
# Create your document
doc = ooolib.Calc()
# Set values. The values are set in column, row order, but the values are
# not in the traditional "A5" style format. Instead we require two integers.
# set_cell_value(col, row, datatype, value)
for row in range(1, 9):
for col in range(1, 9):
doc.set_cell_value(col, row, "float", col * row)
# Save the document to the file you want to create
doc.save("calc-example01.ods")
|