Fix exception in fix_table()

This commit is contained in:
Eric Lapouyade 2017-06-27 16:38:40 +02:00
parent dac4425a1f
commit a4fa1b4f26
14 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
0.3.9 (2017-06-27)
------------------
- Fix exception in fix_table()
0.3.8 (2017-06-20)
------------------
- Fix bug when using more than one {{r }} or {%r %} in the same run

View File

@ -5,7 +5,7 @@ Created : 2015-03-12
@author: Eric Lapouyade
'''
__version__ = '0.3.8'
__version__ = '0.3.9'
from lxml import etree
from docx import Document
@ -174,8 +174,8 @@ class DocxTemplate(object):
for c in columns:
c.set(ns+'w', str(int(float(c.get(ns+'w')) * new_average/old_average)))
# add new columns
for i in range(to_add):
etree.SubElement(tblGrid, ns+'gridCol', {ns+'w': str(int(new_average))})
for i in range(to_add):
etree.SubElement(tblGrid, ns+'gridCol', {ns+'w': str(int(new_average))})
return tree
def new_subdoc(self):

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.