-3
http://openpyxl.readthedocs.io/en/default/_modules/openpyxl/workbook/workbook.html?highlight=set%20active%20sheetopenpyxl设置活动表
文档显示一个工作簿对象具有active
财产
@property
def active(self):
"""Get the currently active sheet"""
return self._sheets[self._active_sheet_index]
@active.setter
def active(self, value):
"""Set the active sheet"""
self._active_sheet_index = value
如果wb = openpyxl.Workbook()
调用wb.active
给默认的第一个工作是Sheet
的称号。 说我创建另一个工作表ws1 = wb.create_sheet('another sheet')
,我如何“设置”这是活动表?
该文档显示有一个活动的“setter”,也称为活动。它需要一个额外的参数,一个整数索引值。
wb.active(1)
怎么回事?我不打电话
的可能的复制[Python的openpyxl选择片](http://stackoverflow.com/questions/36814050/python-openpyxl-select-sheet) –