forked from admin/miem_workers
fix: avoid repeated worksheet scans during XLSX export
This commit is contained in:
1 parent
4aeb26abe9
commit
339dd71f63
5 files changed
+24
-11
No files matched your search
@@ -13,10 +13,6 @@ def _append(sheet, values):
|
||||
if any(isinstance(value, str) and len(value) > 32767 for value in values):
|
||||
raise ValueError("Text exceeds Excel cell limit")
|
||||
sheet.append(values)
|
||||
for cell in sheet[sheet.max_row]:
|
||||
if isinstance(cell.value, str):
|
||||
# CSV/profile content is text, never an Excel formula or error code.
|
||||
cell.data_type = "s"
|
||||
|
||||
|
||||
def council_xlsx(result: dict) -> bytes:
|
||||
@@ -62,6 +58,9 @@ def council_xlsx(result: dict) -> bytes:
|
||||
sheet.column_dimensions[get_column_letter(column)].width = width
|
||||
for row in sheet:
|
||||
for cell in row:
|
||||
if isinstance(cell.value, str):
|
||||
# CSV/profile content is text, never an Excel formula or error code.
|
||||
cell.data_type = "s"
|
||||
cell.alignment = Alignment(vertical="top", wrap_text=True)
|
||||
for cell in sheet[1]:
|
||||
cell.font = Font(bold=True, color="FFFFFF")
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
APP_VERSION = "0.13.0"
|
||||
FRONTEND_VERSION = "0.13.0"
|
||||
BACKEND_VERSION = "0.13.0"
|
||||
APP_VERSION = "0.13.1"
|
||||
FRONTEND_VERSION = "0.13.1"
|
||||
BACKEND_VERSION = "0.13.1"
|
||||
Reference in new issue
Block a user