write_merge to one column and several rows
Status: Alpha
Brought to you by:
rvk
When you try to write_merge(row1,row2,col,col) you get an exception generated with "assert" in line 82 of Cell.py.
You need to change:
<code>assert col1 < col2, '%d < %d is false'%(col1, col2)</code>
to:
<code>assert col1 <= col2, '%d <= %d is false'%(col1, col2)</code>
on line 82 or download file from attach.
<code>assert (col1+1) <= (col2+1), '%d <= %d is false'%(col1, col2)</code>
It's better to fix 0 = False problem (first row)
I've fixed the problem in a different way, since a MulBlankCells record is silly for a single column. I just made it a BlankCell in that case.
Can you explain what you mean by your comment below about "0 = False problem"?
Don't create a MulBlankCell for a single BlankCell
When you try to write_merge(row1,row2,0,0) with first patch, you'll get an assertion error anyway, but the second patch fixes it.
Not for me. At least, when I try it in python 2.7 on Linux, your first solution solves the problem. Are you still able to produce the assertion exception with the code as you initially suggested? If so, let me know, because my solution (in Row, rather than in Cell) uses the same structure for an assertion.