[UPDT] PAYROLL: Payroll export excel sheet style updation while using map

This commit is contained in:
Horilla
2024-08-27 17:32:11 +05:30
parent 807ef268a8
commit 5ceeacfdbc

View File

@@ -1070,7 +1070,7 @@ def payslip_export(request):
response["Content-Disposition"] = f'attachment; filename="{file_name}"'
writer = pd.ExcelWriter(response, engine="xlsxwriter")
data_frame.style.map(lambda x: "text-align: center").to_excel(
data_frame.style.applymap(lambda x: "text-align: center").to_excel(
writer, index=False, sheet_name="Sheet1"
)
worksheet = writer.sheets["Sheet1"]