mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 06:56:13 +00:00
Replace a deprecated method call
Workbook.remove_sheet method deprecated since openpyxl 2.4.0
This commit is contained in:
@@ -35,3 +35,4 @@ Patches and Suggestions
|
||||
- Tushar Makkar
|
||||
- Andrii Soldatenko
|
||||
- Bruno Soares
|
||||
- Tsuyoshi Hombashi
|
||||
|
||||
@@ -34,7 +34,7 @@ packages = [
|
||||
|
||||
install = [
|
||||
'odfpy',
|
||||
'openpyxl',
|
||||
'openpyxl>=2.4.0',
|
||||
'unicodecsv',
|
||||
'xlrd',
|
||||
'xlwt',
|
||||
|
||||
@@ -52,7 +52,7 @@ def export_book(databook, freeze_panes=True):
|
||||
|
||||
wb = Workbook()
|
||||
for sheet in wb.worksheets:
|
||||
wb.remove_sheet(sheet)
|
||||
wb.remove(sheet)
|
||||
for i, dset in enumerate(databook._datasets):
|
||||
ws = wb.create_sheet()
|
||||
ws.title = dset.title if dset.title else 'Sheet%s' % (i)
|
||||
|
||||
Reference in New Issue
Block a user