Merge pull request #4174 from bcornwellmott/xlsx_multi
Allow workbook pass in make_xlsx
This commit is contained in:
commit
bd1fc340f2
1 changed files with 4 additions and 2 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue