Replace a deprecated method call

Workbook.remove_sheet method deprecated since openpyxl 2.4.0
This commit is contained in:
Tsuyoshi Hombashi
2018-10-06 19:19:09 +09:00
parent 5a359ba4de
commit a28a057559
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -35,3 +35,4 @@ Patches and Suggestions
- Tushar Makkar
- Andrii Soldatenko
- Bruno Soares
- Tsuyoshi Hombashi
+1 -1
View File
@@ -34,7 +34,7 @@ packages = [
install = [
'odfpy',
'openpyxl',
'openpyxl>=2.4.0',
'unicodecsv',
'xlrd',
'xlwt',
+1 -1
View File
@@ -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)