{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "spreadsheet-editor-conditional-formatting",
  "framework": "angular",
  "type": "registry:component",
  "component": "Spreadsheet",
  "variant": "conditional-formatting",
  "dependencies": [
    "@syncfusion/ej2-angular-spreadsheet"
  ],
  "description": "Spreadsheet sample demonstrating rules that apply conditional formatting to cell ranges.",
  "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": true,
    "platformIndex": "https://ai.syncfusion.com/angular/llms.txt",
    "skillPack": "syncfusion/angular-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/angular/spreadsheet-editor-conditional-formatting.md"
  },
  "files": [
    {
      "target": "src/components/spreadsheet-editor-conditional-formatting/conditional-formatting.component.ts",
      "content": "import { Component, ViewEncapsulation, ViewChild } from '@angular/core';\nimport { conditionalFormatData } from '../data';\nimport { SpreadsheetComponent, SpreadsheetModule } from '@syncfusion/ej2-angular-spreadsheet';\n/**\n * Conditional Formatting Spreadsheet Component\n */\n@Component({\n    selector: 'control-content',\n    templateUrl: 'conditional-formatting.html',\n    encapsulation: ViewEncapsulation.None,\n    standalone: true,\n    imports: [ SpreadsheetModule]\n})\n\nexport class ConditionalFormattingController {\n    @ViewChild('spreadsheet')\n    spreadsheetObj!: SpreadsheetComponent;\n    data: Object[] = conditionalFormatData();\n    public openUrl = 'https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/open';\n    public saveUrl = 'https://document.syncfusion.com/web-services/spreadsheet-editor/api/spreadsheet/save';\n    created() {\n        this.spreadsheetObj.merge('A1:H1');\n        this.spreadsheetObj.cellFormat({ fontWeight: 'bold', textAlign: 'center' }, 'A2:H2');\n        this.spreadsheetObj.cellFormat({ fontWeight: 'bold', textAlign: 'center', verticalAlign: \"middle\", fontSize: '13pt' }, 'A1:H1');\n        this.spreadsheetObj.conditionalFormat({ type: 'BlueDataBar', range: 'D3:D18' });\n        this.spreadsheetObj.conditionalFormat({ type: 'GreenDataBar', range: 'E3:E18' });\n        this.spreadsheetObj.conditionalFormat({ type: 'ThreeStars', range: 'H3:H18' });\n        this.spreadsheetObj.conditionalFormat({ type: 'Top10Items', value:'1', format:{ style:{ color: '#ffffff', backgroundColor: '#009999', fontWeight: 'bold'}}, range: 'F3:F18' });\n        this.spreadsheetObj.conditionalFormat({ type: 'Bottom10Items', value:'1', format:{ style:{ color: '#ffffff', backgroundColor: '#c68d53', fontWeight: 'bold'}}, range: 'F3:F18' });\n        // Apply format to the specified range in the active sheet.\n        this.spreadsheetObj.numberFormat('$#,##0.00', 'D3:D18');\n        this.spreadsheetObj.numberFormat('$#,##0.00', 'E3:E18');\n        this.spreadsheetObj.numberFormat('$#,##0.00', 'F3:F18');\n        this.spreadsheetObj.numberFormat('m/d/yyyy', 'G3:G18');\n    }\n}\n"
    },
    {
      "target": "src/components/spreadsheet-editor-conditional-formatting/conditional-formatting.html",
      "content": "<div class=\"control-section\">\n    <ejs-spreadsheet #spreadsheet [openUrl]=\"openUrl\" [saveUrl]=\"saveUrl\" (created)=\"created()\">\n        <e-sheets>\n            <e-sheet name=\"Inventory List\">\n                <e-rows>\n                    <e-row [height]=30>\n                        <e-cells>\n                            <e-cell [index]=\"1\" value=\"Inventory List\"></e-cell>\n                        </e-cells>\n                    </e-row>\n                </e-rows>\n                <e-ranges>\n                    <e-range [dataSource]=\"data\" startCell=\"A2\"></e-range>\n                </e-ranges>\n                <e-conditionalformats>\n                    <e-conditionalformat type=\"GYRColorScale\" range=\"C3:C18\"></e-conditionalformat>\n                    <e-conditionalformat type=\"LessThan\" cFColor=\"RedFT\" value=\"8-8-2019\" range=\"G3:G18\"></e-conditionalformat>\n                </e-conditionalformats>\n                <e-columns>\n                    <e-column [width]=100></e-column>\n                    <e-column [width]=158></e-column>\n                    <e-column [width]=72></e-column>\n                    <e-column [width]=110></e-column>\n                    <e-column [width]=110></e-column>\n                    <e-column [width]=77></e-column>\n                    <e-column [width]=97></e-column>\n                    <e-column [width]=73></e-column>\n                </e-columns>\n            </e-sheet>\n        </e-sheets>\n    </ejs-spreadsheet>\n</div>"
    }
  ]
}