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

Krishnakant hackingkk at gmail.com
Tue Mar 17 04:07:23 EDT 2009


Hi David and John.
Thanks a lot, the problem is solved.

David, your idea was the key to solve the problem.
Actually John in his code and the explanation made it clear that the
wrong attributes were being used on wrong elements.

david's code confirmed the fact.  The center style which david had in
his code solved the problem for me because we don't need paragraph
alignment styles but the merged cells to be having center alignment for
the text contained in those cells.

This implied that the centering aught to happen in the cells when they
are created. So that style was applied to the cells in david's code.

The other mistake was that after merging 4 cells I had to actually add 3
cells to be used by the merged (spanned ) cells.  after those cells I
could start my next set of merged cells.
Initially the mistake I was doing was adding a cell which could span 4
cells and try to add another cell just after the code that created that
merged set of cells.

But later on I realised that once cells are merged we have to physically
add the blank cells to fill up the merged space else the next few cells
won't show up with the other text.

Now the code works fine and if any one would ever need this, please do
write to me.

Thanks to all again, specially David and John.

happy hacking.
Krishnakant.






More information about the Python-list mailing list