From 46e6a67bc663647acf047a993e7d2dfb8128b452 Mon Sep 17 00:00:00 2001 From: Dushusir <1414556676@qq.com> Date: Mon, 9 Jun 2025 17:28:33 +0800 Subject: [PATCH] fix: enableServerCalculation --- content/en-US/guides/sheets/features/import-export.mdx | 8 ++++---- content/zh-CN/guides/sheets/features/import-export.mdx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/content/en-US/guides/sheets/features/import-export.mdx b/content/en-US/guides/sheets/features/import-export.mdx index 5b31f0e7..9b30c138 100644 --- a/content/en-US/guides/sheets/features/import-export.mdx +++ b/content/en-US/guides/sheets/features/import-export.mdx @@ -241,8 +241,8 @@ import { downloadFile } from '@univerjs-pro/exchange-client'; const fWorkbook = univerAPI.getActiveWorkbook(); const unitId = fWorkbook.getId(); const file = await univerAPI.exportXLSXByUnitIdAsync(unitId); -// or with SSC switch, trigger server-side formula calculation -// const file = await univerAPI.exportXLSXByUnitIdAsync(unitId, true); +// or with server-side calculation enabled +// const file = await univerAPI.exportXLSXByUnitIdAsync(unitId, { enableServerCalculation: true }); // Download the file downloadFile(file, 'univer', 'xlsx'); @@ -260,8 +260,8 @@ import { downloadFile } from '@univerjs-pro/exchange-client'; const fWorkbook = univerAPI.getActiveWorkbook(); const snapshot = fWorkbook.save(); const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot); -// or with SSC switch, trigger server-side formula calculation -// const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot, true); +// or with server-side calculation enabled +// const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot, { enableServerCalculation: true }); // Download the file downloadFile(file, 'univer', 'xlsx'); diff --git a/content/zh-CN/guides/sheets/features/import-export.mdx b/content/zh-CN/guides/sheets/features/import-export.mdx index 5824f5cf..4e6d24b6 100644 --- a/content/zh-CN/guides/sheets/features/import-export.mdx +++ b/content/zh-CN/guides/sheets/features/import-export.mdx @@ -241,8 +241,8 @@ import { downloadFile } from '@univerjs-pro/exchange-client'; const fWorkbook = univerAPI.getActiveWorkbook(); const unitId = fWorkbook.getId(); const file = await univerAPI.exportXLSXByUnitIdAsync(unitId); -// 或者打开 SSC,触发服务器端公式计算 -// const file = await univerAPI.exportXLSXByUnitIdAsync(unitId, true); +// 或者触发服务端公式计算 +// const file = await univerAPI.exportXLSXByUnitIdAsync(unitId, { enableServerCalculation: true }); // 下载文件 downloadFile(file, 'univer', 'xlsx'); @@ -260,8 +260,8 @@ import { downloadFile } from '@univerjs-pro/exchange-client'; const fWorkbook = univerAPI.getActiveWorkbook(); const snapshot = fWorkbook.save(); const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot); -// 或者打开 SSC,触发服务器端公式计算 -// const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot, true); +// 或者触发服务器端公式计算 +// const file = await univerAPI.exportXLSXBySnapshotAsync(snapshot, { enableServerCalculation: true }); // 下载文件 downloadFile(file, 'univer', 'xlsx');