code: def export_admin_action(self, request, queryset):
          
          export_format = request.POST.get('file_format')
  
          if not export_format:
              messages.warning(request, _('You must select an export format.'))
          else:
              formats = self.get_export_formats()
              file_format = formats[int(export_format)]()
  
              export_data = self.get_export_data(file_format, queryset, request=request)
              content_type = file_format.get_content_type()
              response = HttpResponse(export_data, content_type=content_type)
              response['Content-Disposition'] = 'attachment; filename=%s' % (
                  self.get_export_filename(file_format),
              )
              return response
docs: Exports the selected rows using file_format.