Skip to content

Accept workbook as an object #32

@aprasai

Description

@aprasai

At the moment, xlsx2html function loads the workbook and reads an excel. This works fine if it is a small workbook, or only one sheet within the workbook that needs to be rendered. If we have a big excel workbook where multiple sheets need to be rendered from the same workbook, it will re-reads the workbook significantly adding time to it. However, if a openpyxl workbook object is accepted as an optional parameter, then it gets around the issue of reloading the workbook each time, if we need to render multiple sheets.

if workbook is None:
wb = openpyxl.load_workbook(filepath, data_only=True)
else:
wb=workbook

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions