Sep 16 - Optimize code, part 1

This commit is contained in:
2026-09-16 10:52:59 -04:00
parent 4212726611
commit 7626287344
22 changed files with 587 additions and 96 deletions
+2
View File
@@ -30,6 +30,7 @@ import pymysql
import pymysql.cursors
from config import Config
from utils.excel_safety import neutralize_unexpected_formulas
try:
import openpyxl
@@ -323,6 +324,7 @@ def build_legacy_export_workbook(rows):
ws.freeze_panes = 'A2'
buffer = io.BytesIO()
neutralize_unexpected_formulas(wb) # formula-injection guard (utils/excel_safety.py)
wb.save(buffer)
buffer.seek(0)
return buffer