This commit is contained in:
csj
2026-09-17 15:43:40 +08:00
parent 10697d3dfa
commit 45ccfd69be
11 changed files with 812 additions and 12 deletions
+3 -1
View File
@@ -188,6 +188,7 @@ class PreviewCalculator:
def prepare_preview(path):
from lxml import etree as ET
from spreadsheet_layout import read_layout
template = Template(path)
properties = template.workbook.find(tag('workbookPr'))
@@ -217,4 +218,5 @@ def prepare_preview(path):
with zipfile.ZipFile(path, 'w', zipfile.ZIP_DEFLATED) as output:
for name, data in template.parts.items():
output.writestr(name, data)
return dict(expensePreview='xlsx-quicklook-v1', previewUncalculatedCells=uncalculated)
return dict(expensePreview='xlsx-layout-v2', previewUncalculatedCells=uncalculated,
previewLayout=read_layout(path))