Skip to content

Commit

Permalink
fix: add force_zip64=True and some debugging (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 committed Jul 21, 2022
1 parent f0e987d commit a61bc46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyexcelerate/Writer.py
Expand Up @@ -77,10 +77,11 @@ def save(self, file, **kwargs):
for index, sheet in self.workbook.get_xml_data():
sheetStream = self._worksheet_template.generate({"worksheet": sheet})
try:
with zf.open("xl/worksheets/sheet%s.xml" % (index), mode="w") as f:
with zf.open("xl/worksheets/sheet%s.xml" % (index), mode="w", force_zip64=True) as f:
for s in sheetStream:
f.write(s.encode("utf-8"))
except RuntimeError:
except RuntimeError as e:
print("received error when writing zip file", e)
tfd, tfn = tempfile.mkstemp()
tf = os.fdopen(tfd, "wb")
for s in sheetStream:
Expand Down

0 comments on commit a61bc46

Please sign in to comment.