add excelstyler librery

This commit is contained in:
7nimor
2025-08-16 08:52:00 +03:30
parent ab2a453a54
commit bdd6acc7ca

View File

@@ -1,9 +1,6 @@
from io import BytesIO
from django.http import HttpResponse
from excelstyler.headers import create_header_freez
from excelstyler.helpers import excel_description
from excelstyler.values import create_value
from openpyxl import Workbook
from rest_framework import viewsets
from rest_framework.decorators import action
@@ -11,6 +8,7 @@ from rest_framework.decorators import action
from apps.authorization.api.v1.serializers import UserRelationSerializer
from apps.authorization.models import UserRelations
from apps.core.mixins.search_mixin import DynamicSearchMixin
from common.helper_excel import excel_description, create_header_freez, create_value
class AuthExcelViewSet(viewsets.ModelViewSet, DynamicSearchMixin):
@@ -51,7 +49,7 @@ class AuthExcelViewSet(viewsets.ModelViewSet, DynamicSearchMixin):
"دسترسی ها"
]
excel_description(worksheet, 'B1', f'کاربران', to_row='C3')
excel_description(worksheet, 'B1', f'کاربران', row2='C3')
create_header_freez(worksheet, excel_options, 1, 6, 7, height=25, width=20)
l = 6