Merge pull request #4174 from bcornwellmott/xlsx_multi

Allow workbook pass in make_xlsx
This commit is contained in:
Rushabh Mehta 2017-09-25 11:26:22 +05:30 committed by GitHub
commit bd1fc340f2

View file

@ -12,9 +12,11 @@ from six import StringIO, string_types
# return xlsx file object
def make_xlsx(data, sheet_name):
def make_xlsx(data, sheet_name, wb=None):
if wb is None:
wb = openpyxl.Workbook(write_only=True)
wb = openpyxl.Workbook(write_only=True)
ws = wb.create_sheet(sheet_name, 0)
row1 = ws.row_dimensions[1]