Export list view in Django admin to Excel file
December 21, 2021
The goal is whaterver data is changed in list view by (search, filter, sort ) and you can export result list in same view as you see and you don’t need to manually code every column and data in Excel file. Firstly, create share mixin to export to Excel file from jutil.openpyxl_helpers import rows_to_workbook from uuid import uuid1 from django.utils.text import capfirst class ExportExcelMixin: """ Export current result list to Excel file with data is same as list view. ...