Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
feat: add save snapshot method from worksheet
Wenzhao Hu0f2d22a1d37b
diff --git a/packages/core/src/sheets/worksheet.ts b/packages/core/src/sheets/worksheet.tsindex f8fd1a8a3a..144e0edb8b 100644--- a/packages/core/src/sheets/worksheet.ts+++ b/packages/core/src/sheets/worksheet.ts@@ -74,6 +74,10 @@ export class Worksheet {callback(this._viewModel);}+ getSnapshot(): IWorksheetData {+ return this._snapshot;+ }+/*** Returns WorkSheet Cell Data Matrix* @returnsdiff --git a/packages/sheets/src/index.ts b/packages/sheets/src/index.tsindex d7dd454cb8..a2ac579090 100644--- a/packages/sheets/src/index.ts+++ b/packages/sheets/src/index.ts@@ -1,4 +1,4 @@-export { SheetsPlugin } from './sheets-plugin';+export { type ISheetsPluginConfig, SheetsPlugin } from './sheets-plugin';// #region servicesexport { COMMAND_LISTENER_SKELETON_CHANGE, COMMAND_LISTENER_VALUE_CHANGE } from './basics/const/command-listener-const';diff --git a/packages/sheets/src/sheets-plugin.ts b/packages/sheets/src/sheets-plugin.tsindex e1bab7dc55..52d7ea729f 100644--- a/packages/sheets/src/sheets-plugin.ts+++ b/packages/sheets/src/sheets-plugin.ts@@ -18,7 +18,7 @@ import { SheetInterceptorService } from './services/sheet-interceptor/sheet-inteconst PLUGIN_NAME = 'sheet';-interface ISheetsPluginConfig {+export interface ISheetsPluginConfig {notExecuteFormula?: boolean;}