def __init__(self, file=None, template_styles=None, timestamp=None, templated_sheets=None):
super().__init__()
self.workbook = load_workbook(filename=file) if file else Workbook()
self.template_styles = template_styles or DefaultStyleSet()
self.timestamp = timestamp
self.templated_sheets = []
for sheetname, templated_sheet in self._items.items():
self.add_templated_sheet(templated_sheet, sheetname=sheetname, add_to_self=False)
for templated_sheet in templated_sheets or []:
self.add_templated_sheet(sheet=templated_sheet, sheetname=templated_sheet.sheetname, add_to_self=True)
self._validate()
templated_workbook.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录