Skip to content

Commit

Permalink
fixed comment writing: import and pass correct args to fn
Browse files Browse the repository at this point in the history
  • Loading branch information
OrCharles committed Aug 7, 2015
1 parent f0911cb commit d100c2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openpyxl/writer/dump_worksheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
MAX_ROW,
PACKAGE_XL
)
from openpyxl.xml.functions import xmlfile, Element, SubElement
from openpyxl.xml.functions import tostring, xmlfile, Element, SubElement


DESCRIPTORS_CACHE_SIZE = 50
Expand Down Expand Up @@ -241,6 +241,7 @@ class ExcelDumpWriter(ExcelWriter):
def _write_worksheets(self, archive):
drawing_id = 1
comments_id = 1
vba_controls_id = 1

for i, sheet in enumerate(self.workbook.worksheets, 1):
sheet.close()
Expand All @@ -249,7 +250,7 @@ def _write_worksheets(self, archive):

# write comments
if sheet._comments:
rels = write_rels(sheet, drawing_id, comments_id)
rels = write_rels(sheet, drawing_id, comments_id, vba_controls_id)
archive.writestr( PACKAGE_WORKSHEETS +
'/_rels/sheet%d.xml.rels' % i, tostring(rels) )

Expand Down

0 comments on commit d100c2e

Please sign in to comment.