ooolib, reading writing a spread sheet and keep formatting
News123
news1234 at free.fr
Wed Apr 28 20:16:02 EDT 2010
Hi,
I'm making first attempts to modify a few cells of an openoffice
spreadsheet.
I thought I'll start with ooolib as it seems rather simple.
( linux / open office 3.1 / ooolib-python-0.0.16 )
My first test was just to open a spread sheet
import ooolib
doc = ooolib.Calc()
doc.load("doc1.ods") # load calc file
doc.set_sheet_index(0) # select first sheet
doc_dims = doc.get_sheet_dimensions() # get sheet dimensions
print "dims",doc_dims # and print them out
doc.save("doc2.ods") # save 'unmodfified' file
Extracting data works perfectly.
However the saved file lost all its formating and keeps only the data.
What am I doing wrong?
My goal is to just change one cell value, but to keep all the formatting
(at least of the other cells)
thanks for any hints
N
More information about the Python-list
mailing list