{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "spreadsheet-editor-formula",
  "framework": "angular",
  "type": "registry:component",
  "component": "Spreadsheet",
  "variant": "formula",
  "dependencies": [
    "@syncfusion/ej2-angular-spreadsheet"
  ],
  "description": "Spreadsheet sample demonstrating formula entry, calculation, and dependent cell updates.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 2 (v34.1.29)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/angular/llms.txt",
    "skillPack": "syncfusion/angular-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/angular/spreadsheet-editor-formula.md"
  },
  "files": [
    {
      "target": "src/components/spreadsheet-editor-formula/formula.component.ts",
      "content": "import { Component, ViewEncapsulation, Inject, ViewChild } from '@angular/core';\nimport { SelectionService, EditService, SheetModel, DefineNameModel, SpreadsheetModule } from '@syncfusion/ej2-angular-spreadsheet';\nimport { SpreadsheetComponent } from '@syncfusion/ej2-angular-spreadsheet';\nimport { formulaData } from '../data';\n/**\n * Cell Data Binding Spreadsheet Controller\n */\n@Component({\n    selector: 'control-content',\n    templateUrl: 'formula.html',\n    providers: [SelectionService, EditService],\n    encapsulation: ViewEncapsulation.None,\n    standalone: true,\n    imports: [SpreadsheetModule]\n})\n\nexport class FormulasController {\n    @ViewChild('formula')\n    public spreadsheetObj!: SpreadsheetComponent;\n    public data: Object[] = formulaData();\n    definedNames: DefineNameModel[] = [{\n        name: 'Profit', refersTo: '=F2:F11'\n    },\n    {\n        name: 'High', refersTo: '=D2:D11'\n    }];\n    created() {\n        // Style and number formatting\n        this.spreadsheetObj.cellFormat({ fontWeight: 'bold', backgroundColor: '#279377', color: '#fff', textAlign: 'center', verticalAlign: 'middle', fontSize: '14px' }, 'A1:F1');\n        this.spreadsheetObj.cellFormat({ fontWeight: 'bold', backgroundColor: '#EEEEEE' }, 'A12:F15');\n        this.spreadsheetObj.numberFormat('0.00', 'F2:F11');\n        this.spreadsheetObj.numberFormat('m/d/yyyy', 'A2:A11');\n        this.spreadsheetObj.setRowHeight(40, 0);\n    }\n}\n"
    },
    {
      "target": "src/components/spreadsheet-editor-formula/formula.html",
      "content": "<div class=\"control-section\">\n    <ejs-spreadsheet #formula (created)=\"created()\" [showRibbon]=\"false\" [definedNames]=\"definedNames\">\n        <e-sheets>\n            <e-sheet name=\"Stock Details\" selectedRange=\"F15\">\n                <e-ranges>\n                    <e-range [dataSource]=\"data\"></e-range>\n                </e-ranges>\n                <e-rows>\n                    <e-row [index]=11 [height]=25>\n                        <e-cells>\n                            <e-cell [index]=3 value=\"Average profit:\"></e-cell>\n                            <e-cell [index]=5 formula=\"=AVERAGE(Profit)\" format=\"0.00\"></e-cell>\n                        </e-cells>\n                    </e-row>\n                    <e-row [height]=25>\n                        <e-cells>\n                            <e-cell [index]=3 value=\"Maximum stock value:\"></e-cell>\n                            <e-cell [index]=5 formula=\"=MAX(High)\" format=\"0.00\"></e-cell>\n                        </e-cells>\n                    </e-row>\n                    <e-row [height]=25>\n                        <e-cells>\n                            <e-cell [index]=3 value=\"Minimum stock value:\"></e-cell>\n                            <e-cell [index]=5 formula=\"=MIN(E2:E11)\"></e-cell>\n                        </e-cells>\n                    </e-row>\n                    <e-row [height]=25>\n                        <e-cells>\n                            <e-cell [index]=3 value=\"Non-profitable days:\"></e-cell>\n                            <e-cell [index]=5 formula='=COUNTIF(F2:F11,\"<=0\")'></e-cell>\n                        </e-cells>\n                    </e-row>\n                </e-rows>\n                <e-columns>\n                    <e-column [width]=100></e-column>\n                    <e-column [width]=130></e-column>\n                    <e-column [width]=140></e-column>\n                    <e-column [width]=140></e-column>\n                    <e-column [width]=130></e-column>\n                    <e-column [width]=130></e-column>\n                </e-columns>\n            </e-sheet>\n        </e-sheets>\n    </ejs-spreadsheet>\n</div>\n"
    }
  ]
}