Skip to content

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.

feat(sheet-numfmt-plugin):numfmt plugin optimization

eiji-tha212aef867ca
diff --git a/packages/sheets-plugin-numfmt/src/Controller/NumfmtController.ts b/packages/sheets-plugin-numfmt/src/Controller/NumfmtController.ts
index 503c7e7b21..819f815f30 100644
--- a/packages/sheets-plugin-numfmt/src/Controller/NumfmtController.ts
+++ b/packages/sheets-plugin-numfmt/src/Controller/NumfmtController.ts
@@ -11,11 +11,13 @@ export class NumfmtController {
this._model.setNumfmtValue(row, column, new NumfmtValue(numfmt));
}
- getValue(row: number, column: number): string {
- return '';
+ getColor(row: number, column: number): string {
+ const numfmt = this._model.getNumfmtValue(row, column);
+ return numfmt ? numfmt.getColor() : '';
}
- getColor(row: number, column: number): string {
- return '';
+ getValue(row: number, column: number): string {
+ const numfmt = this._model.getNumfmtValue(row, column);
+ return numfmt ? numfmt.getValue() : '';
}
}