finally successful in ods with python, just one help needed.

Krishnakant hackingkk at
Sat Mar 14 09:27:46 CET 2009

On Thu, 2009-03-12 at 14:49 -0700, John Machin wrote:

> I see that you haven't had the evil spirits exorcised from your mail/
> news client ... it's hijacked a thread again :-(
> don't worry, won't happen this time.

It seams I did some thing wrong with the settings and it drops out
Now the problem is sorted out.

> >
> > The cell merging is happening but no text centering in those merged
> > cells.
> >
> > If any one is interested I can send my part of code snippid.
> > to just tell in short, it just has the sudo code as
> > create document
> >
> > create a style to set centered text
> >
> > create table and add rows to which cells are added.
> > the cell has a p (paragraph ) element with the style of centered text
> > applied.
> >
> > cells are merged
> >
> > but no centering happens.
> >
> > Please let me know if any one wanted me to send the code off the list.
> >
> > Even better, if some one has a code snippid which can just do that.
> You might like to try:
> (a) checking that you can get text centred in an UNmerged cell
Tryed, it works perfectly.  The text gets centered in an unmerged cell.

> (b) using Calc, creating a small ods file with your desired
> formatting, then comparing the XML in that ods file with the one your
> script has created
This is the first thing I tryed and even got some insight into the xml.
However when I apply the same elements and attributes to the one I am
creating with odfpy, I get "attribute not allowed " errors.
If some one is interested to look at the code, please let me know, I can
send an attachment off the list so that others are not forced to
download some thing they are not concerned about.

> (c) contacting the author/maintainer of the odfpy package

Done and awaiting the reply for last 4 days.

It was then that I came to this thread.

happy hacking.

More information about the Python-list mailing list