django-commons / drf-excel

An XLSX spreadsheet renderer for Django REST Framework.
BSD 3-Clause "New" or "Revised" License
217 stars 40 forks source link

Error importing save_virtual_wookbook removed in openpyxl 3.1 #73

Closed alb3rto269 closed 1 year ago

alb3rto269 commented 1 year ago

drf_excel.renderers.XLSXRenderer uses openpyxl.writer.excel.save_virtual_workbook which has been deprecated in openpyxl 2.6 (2018) and was removed in openpyxl 3.1.0.

The above causes that projects using this library fail with an import error.

I created https://github.com/wharton/drf-excel/pull/72 to solve this issue. If the proposed solution is not the accepted then It would be great to accept https://github.com/wharton/drf-excel/pull/71 in the meantime.