diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index f2bb1774ff..214ca4f39b 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -5416,6 +5416,11 @@
  • Create a object structure
  • Changing the active sheet while importing a file
  • Identify the context menu opened
  • +
  • Find and replace the text within the selected range of cells
  • +
  • Add dynamic cell templates
  • +
  • Add an icon to the cell
  • +
  • Get the filtered row data
  • +
  • Paste only values without formatting and styles
  • Mobile Responsiveness
  • diff --git a/Document-Processing/Excel/Spreadsheet/Angular/how-to/add-cell-icon.md b/Document-Processing/Excel/Spreadsheet/Angular/how-to/add-cell-icon.md new file mode 100644 index 0000000000..2df6a03595 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/Angular/how-to/add-cell-icon.md @@ -0,0 +1,25 @@ +--- +layout: post +title: Add icons inside cells in Angular Spreadsheet component | Syncfusion +description: Learn here all about adding icon inside cells using a custom template in Syncfusion Angular Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Add Custom Icons to Cells in Angular Spreadsheet + +In the Syncfusion Spreadsheet, you can render custom icons inside specific cells by defining a custom template property within the cell model. During the [beforeCellRender](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#beforecellrender) event, the icon element can be appended to the corresponding table cell (td) by checking whether the cell contains this template property. + +The following sample demonstrates how to add icons to cells by assigning the template property in the cell definition. Additionally, a custom ribbon item named "Add Icon" is included under a new "Template" ribbon tab. When this ribbon item is selected, the Spreadsheet dynamically inserts an icon into the currently active cell. + +{% tabs %} +{% highlight js tabtitle="app.ts" %} +{% include code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/app.ts %} +{% endhighlight %} +{% highlight ts tabtitle="main.ts" %} +{% include code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/main.ts %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1" %} diff --git a/Document-Processing/Excel/Spreadsheet/Angular/how-to/add-dynamic-cell-template.md b/Document-Processing/Excel/Spreadsheet/Angular/how-to/add-dynamic-cell-template.md new file mode 100644 index 0000000000..9aa1b75af5 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/Angular/how-to/add-dynamic-cell-template.md @@ -0,0 +1,25 @@ +--- +layout: post +title: Dynamic cell template in Angular Spreadsheet component | Syncfusion +description: Render dropdown templates inside cells in Syncfusion Angular Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Create Dynamic Cell Templates with Dropdowns in Angular Spreadsheet + +You can add templates to cells in the Syncfusion Spreadsheet component by dynamically assigning a custom template property directly to individual cells. When a cell has this custom template property, you can use the [beforeCellRender](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#beforecellrender) event to append the desired template element to the cell. + +The following sample demonstrates how to insert a [Syncfusion Dropdown component](https://www.npmjs.com/package/@syncfusion/ej2-dropdowns) into Spreadsheet cells using this custom template property. Additionally, a custom ribbon item named "DropDown List" is included under a new "Template" ribbon tab. When this ribbon item is selected, the Spreadsheet dynamically inserts a dropdown into the currently active cell. + +{% tabs %} +{% highlight js tabtitle="app.ts" %} +{% include code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/app.ts %} +{% endhighlight %} +{% highlight ts tabtitle="main.ts" %} +{% include code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/main.ts %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1" %} \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/Angular/how-to/find-replace-in-range.md b/Document-Processing/Excel/Spreadsheet/Angular/how-to/find-replace-in-range.md new file mode 100644 index 0000000000..1d1056d751 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/Angular/how-to/find-replace-in-range.md @@ -0,0 +1,25 @@ +--- +layout: post +title: Find and replace in Angular Spreadsheet component | Syncfusion +description: Learn here all about performing find and replace limited to the range in Syncfusion Angular Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Find and replace the text within selected range of cells + +In Syncfusion Spreadsheet, the "Replace All" action by default searches and replaces a text throughout the entire sheet, regardless of the selected range. To limit "Replace All" to only the selected range, you can customize the addressCollection based on the selectedRange in the [actionBegin](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#actionbegin) event when the action is `beforeReplaceAll`. + +The following sample demonstrates how to limit the "Replace All" operation to the currently selected range. + +{% tabs %} +{% highlight js tabtitle="app.ts" %} +{% include code-snippet/spreadsheet/angular/find-and-replace-cs1/src/app.ts %} +{% endhighlight %} +{% highlight ts tabtitle="main.ts" %} +{% include code-snippet/spreadsheet/angular/find-and-replace-cs1/src/main.ts %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/angular/find-and-replace-cs1" %} diff --git a/Document-Processing/Excel/Spreadsheet/Angular/how-to/get-filtered-data.md b/Document-Processing/Excel/Spreadsheet/Angular/how-to/get-filtered-data.md new file mode 100644 index 0000000000..4e3d0ee305 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/Angular/how-to/get-filtered-data.md @@ -0,0 +1,25 @@ +--- +layout: post +title: Filtered row data in Angular Spreadsheet component | Syncfusion +description: Learn here all about getting filtered row data in Syncfusion Angular Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Get filtered row data in Angular Spreadsheet + +Filtering in the Syncfusion Spreadsheet allows you to display only the rows that match your criteria, hiding all others. You can enable filtering by setting the [allowFiltering](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#allowfiltering) property, and apply filters either through the UI or programmatically using the [applyFilter](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#applyfilter) method. To identify which rows are filtered, iterate through the sheet's row collection and check the `isFiltered` property of each row object. This flag indicates whether a row is currently hidden due to filtering. + +The following example shows how to get the filtered rows from the Spreadsheet: + +{% tabs %} +{% highlight js tabtitle="app.ts" %} +{% include code-snippet/spreadsheet/angular/filter-cs2/src/app.ts %} +{% endhighlight %} +{% highlight ts tabtitle="main.ts" %} +{% include code-snippet/spreadsheet/angular/filter-cs2/src/main.ts %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/angular/filter-cs2" %} \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/Angular/how-to/paste-only-values-without-formatting.md b/Document-Processing/Excel/Spreadsheet/Angular/how-to/paste-only-values-without-formatting.md new file mode 100644 index 0000000000..8c32bef959 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/Angular/how-to/paste-only-values-without-formatting.md @@ -0,0 +1,25 @@ +--- +layout: post +title: Paste Without Formatting in Angular Spreadsheet component | Syncfusion +description: Learn here about Paste only values without formatting during copy and paste in Syncfusion Angular Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Paste Values Without Formatting and styles in Angular Spreadsheet + +In the Syncfusion angular Spreadsheet, you can make the paste action insert only the raw values into the cells, without bringing any formatting or styles from the copied content. This can be done by using the [actionBegin](https://ej2.syncfusion.com/angular/documentation/api/spreadsheet/index-default#actionbegin) event, where the Spreadsheet provides the details of the action being performed. When the action is a clipboard operation, you can set the paste type to Values, ensuring that only plain values are pasted into the sheet. + +The following example shows how to paste values without formatting. + +{% tabs %} +{% highlight js tabtitle="app.ts" %} +{% include code-snippet/spreadsheet/angular/paste-values-cs1/src/app.ts %} +{% endhighlight %} +{% highlight ts tabtitle="main.ts" %} +{% include code-snippet/spreadsheet/angular/paste-values-cs1/src/main.ts %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/angular/paste-values-cs1" %} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/angular.json b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/angular.json new file mode 100644 index 0000000000..98b735ee4b --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/angular.json @@ -0,0 +1,70 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "syncfusion-component": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist", + "index": "index.html", + "main": "src/main.ts", + "tsConfig": "tsconfig.json", + "styles": [ + "src/styles.css" + ], + "assets": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "10mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "syncfusion-component:build:production" + }, + "development": { + "buildTarget": "syncfusion-component:build:development" + } + }, + "defaultConfiguration": "development" + } + } + } + }, + "cli": { + "analytics": false + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/index.html b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/index.html new file mode 100644 index 0000000000..a36c5a3144 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/index.html @@ -0,0 +1,28 @@ + + + + Syncfusion Angular Spreadsheet + + + + + + + + + +
    LOADING....
    +
    + + \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/app.ts b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/app.ts new file mode 100644 index 0000000000..267ad445d6 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/app.ts @@ -0,0 +1,64 @@ +import { Component, ViewChild } from '@angular/core'; +import { SpreadsheetAllModule, SpreadsheetComponent } from '@syncfusion/ej2-angular-spreadsheet'; + +@Component({ + imports: [SpreadsheetAllModule], + standalone: true, + selector: 'app-container', + template: ` + + + ` +}) +export class AppComponent { + @ViewChild('spreadsheet') public spreadsheetObj?: SpreadsheetComponent; + + private createPlusIconWrapper(): HTMLElement { + const wrapperDiv = document.createElement('div'); + wrapperDiv.className = 'e-custom-wrapper'; + const iconSpan = document.createElement('span'); + iconSpan.className = 'e-icons e-plus e-custom-icon'; + wrapperDiv.appendChild(iconSpan); + return wrapperDiv; + } + + public handleCreated(): void { + if (!this.spreadsheetObj) return; + // place plus-icon templates into A1,B1,C1 + this.spreadsheetObj.updateCell({ template: 'plus-icon' } as any, 'A1'); + this.spreadsheetObj.updateCell({ template: 'plus-icon' } as any, 'B1'); + this.spreadsheetObj.updateCell({ template: 'plus-icon' } as any, 'C1'); + this.spreadsheetObj.resize(); + this.spreadsheetObj.addRibbonTabs([ + { + header: { text: 'Template' }, + content: [ + { + text: 'Add Icon', + tooltipText: 'Initialize', + click: () => { + if (!this.spreadsheetObj) return; + const sheet: any = this.spreadsheetObj.getActiveSheet(); + this.spreadsheetObj.updateCell({ template: 'plus-icon' } as any, sheet.activeCell); + this.spreadsheetObj.resize(); + }, + }, + ], + }, + ]); + } + + public handleBeforeCellRender(args: any): void { + if (args.cell && args.cell.template === 'plus-icon') { + const wrapper = this.createPlusIconWrapper(); + args.element.insertBefore(wrapper, args.element.firstChild); + } + } +} + + diff --git a/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/main.ts b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/main.ts new file mode 100644 index 0000000000..37a1e9c190 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/main.ts @@ -0,0 +1,4 @@ +import { bootstrapApplication } from '@angular/platform-browser'; +import { AppComponent } from './app'; +import 'zone.js'; +bootstrapApplication(AppComponent).catch((err) => console.error(err)); \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/styles.css b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/styles.css new file mode 100644 index 0000000000..517366f42c --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/src/styles.css @@ -0,0 +1,15 @@ + +@import 'node_modules/@syncfusion/ej2-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-lists/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-grids/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-splitbuttons/styles/material.css'; \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/tsconfig.json b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/tsconfig.json new file mode 100644 index 0000000000..9fa16d6333 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/add-icon-in-cell-cs1/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/angular.json b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/angular.json new file mode 100644 index 0000000000..98b735ee4b --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/angular.json @@ -0,0 +1,70 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "syncfusion-component": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist", + "index": "index.html", + "main": "src/main.ts", + "tsConfig": "tsconfig.json", + "styles": [ + "src/styles.css" + ], + "assets": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "10mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "syncfusion-component:build:production" + }, + "development": { + "buildTarget": "syncfusion-component:build:development" + } + }, + "defaultConfiguration": "development" + } + } + } + }, + "cli": { + "analytics": false + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/index.html b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/index.html new file mode 100644 index 0000000000..a36c5a3144 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/index.html @@ -0,0 +1,28 @@ + + + + Syncfusion Angular Spreadsheet + + + + + + + + + +
    LOADING....
    +
    + + \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/app.ts b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/app.ts new file mode 100644 index 0000000000..218ffd995a --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/app.ts @@ -0,0 +1,78 @@ +import { Component, ViewChild } from '@angular/core'; +import { SpreadsheetAllModule, SpreadsheetComponent } from '@syncfusion/ej2-angular-spreadsheet'; +import { DropDownList } from '@syncfusion/ej2-dropdowns'; +import { getCellIndexes, getCell, setCell } from '@syncfusion/ej2-spreadsheet'; + +@Component({ + selector: 'app-container', + standalone: true, + imports: [SpreadsheetAllModule], + template: ` + + + ` +}) +export class AppComponent { + @ViewChild('spreadsheet') public spreadsheetObj?: SpreadsheetComponent; + + private dropDownOptions: number[] = [10, 20, 30, 40, 50, 60]; + + public onCreated(): void { + const spreadsheet = this.spreadsheetObj; + if (!spreadsheet) return; + + spreadsheet.addRibbonTabs([ + { + header: { text: 'Template' }, + content: [ + { + text: 'DropDown List', + click: () => { + const sheet: any = spreadsheet.getActiveSheet(); + const [rowIdx, colIdx]: number[] = getCellIndexes((sheet as any).activeCell); + const cellModel: any = getCell(rowIdx, colIdx, sheet as any); + const cellEle: HTMLElement = spreadsheet.getCell(rowIdx, colIdx) as HTMLElement; + if (cellModel && (cellModel as any).template === 'dropdown-list') return; + this.addDropDownlist(cellEle as HTMLElement, this.dropDownOptions); + } + } + ] + } + ]); + + spreadsheet.setRowsHeight(35, ['1:100']); + const activeSheet: any = spreadsheet.getActiveSheet(); + for (let colIdx = 0; colIdx <= 3; colIdx++) { + setCell(0, colIdx, activeSheet as any, { template: 'dropdown-list' } as any, true); + } + spreadsheet.resize(); + } + + public beforeCellRender(args: any): void { + if (args.rowIndex !== undefined && args.colIndex !== undefined) { + if (args.cell && args.cell.template === 'dropdown-list') { + this.addDropDownlist(args.element as HTMLElement, this.dropDownOptions); + } + } + } + + private addDropDownlist(element: HTMLElement, legendOptions: number[]): void { + if (!this.spreadsheetObj) return; + element.innerHTML = ''; + const inputEle: HTMLInputElement = document.createElement('input'); + element.appendChild(inputEle); + new DropDownList({ + placeholder: 'Select a value', + dataSource: legendOptions, + cssClass: 'e-dropdown-list', + change: (event: any) => { + const sheet: any = this.spreadsheetObj!.getActiveSheet(); + const addr = (sheet as any).activeCell; + this.spreadsheetObj!.updateCell({ value: event.value?.toString() }, addr); + } + }, inputEle); + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/main.ts b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/main.ts new file mode 100644 index 0000000000..37a1e9c190 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/main.ts @@ -0,0 +1,4 @@ +import { bootstrapApplication } from '@angular/platform-browser'; +import { AppComponent } from './app'; +import 'zone.js'; +bootstrapApplication(AppComponent).catch((err) => console.error(err)); \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/styles.css b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/styles.css new file mode 100644 index 0000000000..517366f42c --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/src/styles.css @@ -0,0 +1,15 @@ + +@import 'node_modules/@syncfusion/ej2-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-lists/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-grids/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-splitbuttons/styles/material.css'; \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/tsconfig.json b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/tsconfig.json new file mode 100644 index 0000000000..9fa16d6333 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/dynamic-cell-template-cs1/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/angular.json b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/angular.json new file mode 100644 index 0000000000..98b735ee4b --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/angular.json @@ -0,0 +1,70 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "syncfusion-component": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist", + "index": "index.html", + "main": "src/main.ts", + "tsConfig": "tsconfig.json", + "styles": [ + "src/styles.css" + ], + "assets": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "10mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "syncfusion-component:build:production" + }, + "development": { + "buildTarget": "syncfusion-component:build:development" + } + }, + "defaultConfiguration": "development" + } + } + } + }, + "cli": { + "analytics": false + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/index.html b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/index.html new file mode 100644 index 0000000000..a36c5a3144 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/index.html @@ -0,0 +1,28 @@ + + + + Syncfusion Angular Spreadsheet + + + + + + + + + +
    LOADING....
    +
    + + \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/app.ts b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/app.ts new file mode 100644 index 0000000000..5aca88be85 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/app.ts @@ -0,0 +1,86 @@ +import { Component, ViewChild } from '@angular/core'; +import { SpreadsheetAllModule, SpreadsheetComponent } from '@syncfusion/ej2-angular-spreadsheet'; +import { getDefaultData } from './datasource'; + +@Component({ + imports: [SpreadsheetAllModule], + standalone: true, + selector: 'app-container', + template: ` + + + ` +}) +export class AppComponent { + @ViewChild('spreadsheet') public spreadsheetObj!: SpreadsheetComponent; + + public sheets: any[] = [ + { + name: 'Sheet1', + ranges: [ + { + dataSource: getDefaultData, + startCell: 'A1' + } + ] + } + ]; + + public actionBegin = (args: any): void => { + const action: string = args.action; + const eventArgs: any = args.args && args.args.eventArgs; + + if (action === 'beforeReplaceAll') { + const spreadsheet = this.spreadsheetObj; + if (!spreadsheet) return; + + const selectedRange: string | undefined = spreadsheet.getActiveSheet().selectedRange; + if (!selectedRange) return; + + const selectedRangeCollection: string[] = this.generateCellCollection(selectedRange, spreadsheet); + const replaceAllCollection: Array = eventArgs.addressCollection as Array; + if (!Array.isArray(replaceAllCollection)) return; + + const selectedSet: Set = new Set(selectedRangeCollection); + const updatedCollection: Array = []; + + for (const cell of replaceAllCollection) { + if (cell && selectedSet.has(cell)) { + updatedCollection.push(cell); + } else { + updatedCollection.push(null); + } + } + + if (updatedCollection.length > 0) { + eventArgs.addressCollection = updatedCollection; + } + } + }; + + private generateCellCollection(range: string, spreadsheet: SpreadsheetComponent): string[] { + const collection: string[] = []; + let [startCell, endCell]: string[] = range.split(':'); + endCell = endCell || startCell; + const activeSheetName: string = spreadsheet.getActiveSheet().name!; + + const startMatches = startCell.match(/[A-Z]+|\d+/g) || []; + const endMatches = endCell.match(/[A-Z]+|\d+/g) || []; + const startCol = startMatches[0] || ''; + const startRow = startMatches[1] || '1'; + const endCol = endMatches[0] || startCol; + const endRow = endMatches[1] || startRow; + + const colRange: [number, number] = [startCol.toUpperCase().charCodeAt(0), endCol.toUpperCase().charCodeAt(0)]; + const rowRange: [number, number] = [parseInt(startRow), parseInt(endRow)]; + + for (let col: number = colRange[0]; col <= colRange[1]; col++) { + for (let row: number = rowRange[0]; row <= rowRange[1]; row++) { + collection.push(`${activeSheetName}!${String.fromCharCode(col)}${row}`); + } + } + return collection; + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/datasource.ts b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/datasource.ts new file mode 100644 index 0000000000..57d332dfc3 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/datasource.ts @@ -0,0 +1,234 @@ +export let getDefaultData: Object[] = [ + { + "Customer Name": "Romona Heaslip", + "Model": "Taurus", + "Color": "Aquamarine", + "Payment Mode": "Debit Card", + "Delivery Date": "07/11/2015", + "Amount": "8529.22" + }, + { + "Customer Name": "Clare Batterton", + "Model": "Sparrow", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/13/2016", + "Amount": "17866.19" + }, + { + "Customer Name": "Eamon Traise", + "Model": "Grand Cherokee", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "09/04/2015", + "Amount": "13853.09" + }, + { + "Customer Name": "Julius Gorner", + "Model": "GTO", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/15/2017", + "Amount": "2338.74" + }, + { + "Customer Name": "Jenna Schoolfield", + "Model": "LX", + "Color": "Yellow", + "Payment Mode": "Credit Card", + "Delivery Date": "10/08/2014", + "Amount": "9578.45" + }, + { + "Customer Name": "Marylynne Harring", + "Model": "Catera", + "Color": "Green", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/01/2017", + "Amount": "19141.62" + }, + { + "Customer Name": "Vilhelmina Leipelt", + "Model": "7 Series", + "Color": "Goldenrod", + "Payment Mode": "Credit Card", + "Delivery Date": "12/20/2015", + "Amount": "6543.30" + }, + { + "Customer Name": "Barby Heisler", + "Model": "Corvette", + "Color": "Red", + "Payment Mode": "Credit Card", + "Delivery Date": "11/24/2014", + "Amount": "13035.06" + }, + { + "Customer Name": "Karyn Boik", + "Model": "Regal", + "Color": "Indigo", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2014", + "Amount": "18488.80" + }, + { + "Customer Name": "Jeanette Pamplin", + "Model": "S4", + "Color": "Fuscia", + "Payment Mode": "Net Banking", + "Delivery Date": "12/30/2014", + "Amount": "12317.04" + }, + { + "Customer Name": "Cristi Espinos", + "Model": "TL", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/18/2013", + "Amount": "6230.13" + }, + { + "Customer Name": "Issy Humm", + "Model": "Club Wagon", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "02/02/2015", + "Amount": "9709.49" + }, + { + "Customer Name": "Tuesday Fautly", + "Model": "V8 Vantage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "11/19/2014", + "Amount": "9766.10" + }, + { + "Customer Name": "Rosemaria Thomann", + "Model": "Caravan", + "Color": "Violet", + "Payment Mode": "Net Banking", + "Delivery Date": "02/08/2014", + "Amount": "7685.49" + }, + { + "Customer Name": "Lyell Fuentez", + "Model": "Bravada", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "08/05/2016", + "Amount": "18012.45" + }, + { + "Customer Name": "Raynell Layne", + "Model": "Colorado", + "Color": "Pink", + "Payment Mode": "Credit Card", + "Delivery Date": "05/30/2016", + "Amount": "2785.49" + }, + { + "Customer Name": "Raye Whines", + "Model": "4Runner", + "Color": "Red", + "Payment Mode": "Debit Card", + "Delivery Date": "12/10/2016", + "Amount": "9967.74" + }, + { + "Customer Name": "Virgina Aharoni", + "Model": "TSX", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/23/2014", + "Amount": "5584.33" + }, + { + "Customer Name": "Peta Cheshir", + "Model": "Pathfinder", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "12/24/2015", + "Amount": "5286.53" + }, + { + "Customer Name": "Jule Urion", + "Model": "Charger", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "11/20/2013", + "Amount": "13511.91" + }, + { + "Customer Name": "Lew Gilyatt", + "Model": "Bonneville", + "Color": "Crimson", + "Payment Mode": "Credit Card", + "Delivery Date": "11/19/2013", + "Amount": "6498.19" + }, + { + "Customer Name": "Jobey Fortun", + "Model": "B-Series", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "10/30/2014", + "Amount": "10359.67" + }, + { + "Customer Name": "Blondie Crump", + "Model": "Voyager", + "Color": "Turquoise", + "Payment Mode": "Credit Card", + "Delivery Date": "04/06/2018", + "Amount": "8118.39" + }, + { + "Customer Name": "Florentia Binns", + "Model": "Grand Prix", + "Color": "Orange", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/13/2016", + "Amount": "10204.37" + }, + { + "Customer Name": "Jaquelin Galtone", + "Model": "Sunbird", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "10/22/2013", + "Amount": "6528.06" + }, + { + "Customer Name": "Hakeem Easseby", + "Model": "Mirage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "9/12/2014", + "Amount": "5619.25" + }, + { + "Customer Name": "Nickolaus Gidman", + "Model": "XK", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2016", + "Amount": "5091.43" + }, + { + "Customer Name": "Jenine Iglesia", + "Model": "Accord", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "09/03/2018", + "Amount": "14566.08" + }, + { + "Customer Name": "Fax Witherspoon", + "Model": "Range Rover Sport", + "Color": "Orange", + "Payment Mode": "Credit Card", + "Delivery Date": "2/22/2018", + "Amount": "5284.87" + } + ]; \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/main.ts b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/main.ts new file mode 100644 index 0000000000..37a1e9c190 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/main.ts @@ -0,0 +1,4 @@ +import { bootstrapApplication } from '@angular/platform-browser'; +import { AppComponent } from './app'; +import 'zone.js'; +bootstrapApplication(AppComponent).catch((err) => console.error(err)); \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/styles.css b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/styles.css new file mode 100644 index 0000000000..517366f42c --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/src/styles.css @@ -0,0 +1,15 @@ + +@import 'node_modules/@syncfusion/ej2-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-lists/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-grids/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-splitbuttons/styles/material.css'; \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/tsconfig.json b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/tsconfig.json new file mode 100644 index 0000000000..9fa16d6333 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/find-and-replace-cs1/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/angular.json b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/angular.json new file mode 100644 index 0000000000..98b735ee4b --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/angular.json @@ -0,0 +1,70 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "syncfusion-component": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist", + "index": "index.html", + "main": "src/main.ts", + "tsConfig": "tsconfig.json", + "styles": [ + "src/styles.css" + ], + "assets": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "10mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "syncfusion-component:build:production" + }, + "development": { + "buildTarget": "syncfusion-component:build:development" + } + }, + "defaultConfiguration": "development" + } + } + } + }, + "cli": { + "analytics": false + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/index.html b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/index.html new file mode 100644 index 0000000000..a36c5a3144 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/index.html @@ -0,0 +1,28 @@ + + + + Syncfusion Angular Spreadsheet + + + + + + + + + +
    LOADING....
    +
    + + \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/app.ts b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/app.ts new file mode 100644 index 0000000000..acbdf37a79 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/app.ts @@ -0,0 +1,34 @@ +import { Component, ViewChild } from '@angular/core'; +import { SpreadsheetAllModule, SpreadsheetComponent } from '@syncfusion/ej2-angular-spreadsheet'; +import { getDefaultData } from './datasource'; + +@Component({ + selector: 'app-container', + standalone: true, + imports: [SpreadsheetAllModule], + template: ` + + ` +}) +export class AppComponent { + @ViewChild('spreadsheet') public spreadsheetRef?: SpreadsheetComponent; + + public sheets: any[] = [ + { + name: 'Sheet1', + ranges: [ + { + dataSource: getDefaultData, + startCell: 'A1' + } + ] + } + ]; + + public actionBegin(args: any): void { + // If the user is pasting via clipboard, force paste to values only. + if (args.action === "clipboard") { + args.args.eventArgs.type = 'Values'; + } + } +} \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/datasource.ts b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/datasource.ts new file mode 100644 index 0000000000..57d332dfc3 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/datasource.ts @@ -0,0 +1,234 @@ +export let getDefaultData: Object[] = [ + { + "Customer Name": "Romona Heaslip", + "Model": "Taurus", + "Color": "Aquamarine", + "Payment Mode": "Debit Card", + "Delivery Date": "07/11/2015", + "Amount": "8529.22" + }, + { + "Customer Name": "Clare Batterton", + "Model": "Sparrow", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/13/2016", + "Amount": "17866.19" + }, + { + "Customer Name": "Eamon Traise", + "Model": "Grand Cherokee", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "09/04/2015", + "Amount": "13853.09" + }, + { + "Customer Name": "Julius Gorner", + "Model": "GTO", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/15/2017", + "Amount": "2338.74" + }, + { + "Customer Name": "Jenna Schoolfield", + "Model": "LX", + "Color": "Yellow", + "Payment Mode": "Credit Card", + "Delivery Date": "10/08/2014", + "Amount": "9578.45" + }, + { + "Customer Name": "Marylynne Harring", + "Model": "Catera", + "Color": "Green", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "7/01/2017", + "Amount": "19141.62" + }, + { + "Customer Name": "Vilhelmina Leipelt", + "Model": "7 Series", + "Color": "Goldenrod", + "Payment Mode": "Credit Card", + "Delivery Date": "12/20/2015", + "Amount": "6543.30" + }, + { + "Customer Name": "Barby Heisler", + "Model": "Corvette", + "Color": "Red", + "Payment Mode": "Credit Card", + "Delivery Date": "11/24/2014", + "Amount": "13035.06" + }, + { + "Customer Name": "Karyn Boik", + "Model": "Regal", + "Color": "Indigo", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2014", + "Amount": "18488.80" + }, + { + "Customer Name": "Jeanette Pamplin", + "Model": "S4", + "Color": "Fuscia", + "Payment Mode": "Net Banking", + "Delivery Date": "12/30/2014", + "Amount": "12317.04" + }, + { + "Customer Name": "Cristi Espinos", + "Model": "TL", + "Color": "Aquamarine", + "Payment Mode": "Credit Card", + "Delivery Date": "12/18/2013", + "Amount": "6230.13" + }, + { + "Customer Name": "Issy Humm", + "Model": "Club Wagon", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "02/02/2015", + "Amount": "9709.49" + }, + { + "Customer Name": "Tuesday Fautly", + "Model": "V8 Vantage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "11/19/2014", + "Amount": "9766.10" + }, + { + "Customer Name": "Rosemaria Thomann", + "Model": "Caravan", + "Color": "Violet", + "Payment Mode": "Net Banking", + "Delivery Date": "02/08/2014", + "Amount": "7685.49" + }, + { + "Customer Name": "Lyell Fuentez", + "Model": "Bravada", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "08/05/2016", + "Amount": "18012.45" + }, + { + "Customer Name": "Raynell Layne", + "Model": "Colorado", + "Color": "Pink", + "Payment Mode": "Credit Card", + "Delivery Date": "05/30/2016", + "Amount": "2785.49" + }, + { + "Customer Name": "Raye Whines", + "Model": "4Runner", + "Color": "Red", + "Payment Mode": "Debit Card", + "Delivery Date": "12/10/2016", + "Amount": "9967.74" + }, + { + "Customer Name": "Virgina Aharoni", + "Model": "TSX", + "Color": "Pink", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/23/2014", + "Amount": "5584.33" + }, + { + "Customer Name": "Peta Cheshir", + "Model": "Pathfinder", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "12/24/2015", + "Amount": "5286.53" + }, + { + "Customer Name": "Jule Urion", + "Model": "Charger", + "Color": "Violet", + "Payment Mode": "Debit Card", + "Delivery Date": "11/20/2013", + "Amount": "13511.91" + }, + { + "Customer Name": "Lew Gilyatt", + "Model": "Bonneville", + "Color": "Crimson", + "Payment Mode": "Credit Card", + "Delivery Date": "11/19/2013", + "Amount": "6498.19" + }, + { + "Customer Name": "Jobey Fortun", + "Model": "B-Series", + "Color": "Blue", + "Payment Mode": "Net Banking", + "Delivery Date": "10/30/2014", + "Amount": "10359.67" + }, + { + "Customer Name": "Blondie Crump", + "Model": "Voyager", + "Color": "Turquoise", + "Payment Mode": "Credit Card", + "Delivery Date": "04/06/2018", + "Amount": "8118.39" + }, + { + "Customer Name": "Florentia Binns", + "Model": "Grand Prix", + "Color": "Orange", + "Payment Mode": "Cash On Delivery", + "Delivery Date": "10/13/2016", + "Amount": "10204.37" + }, + { + "Customer Name": "Jaquelin Galtone", + "Model": "Sunbird", + "Color": "Red", + "Payment Mode": "Net Banking", + "Delivery Date": "10/22/2013", + "Amount": "6528.06" + }, + { + "Customer Name": "Hakeem Easseby", + "Model": "Mirage", + "Color": "Crimson", + "Payment Mode": "Debit Card", + "Delivery Date": "9/12/2014", + "Amount": "5619.25" + }, + { + "Customer Name": "Nickolaus Gidman", + "Model": "XK", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "05/12/2016", + "Amount": "5091.43" + }, + { + "Customer Name": "Jenine Iglesia", + "Model": "Accord", + "Color": "Orange", + "Payment Mode": "Debit Card", + "Delivery Date": "09/03/2018", + "Amount": "14566.08" + }, + { + "Customer Name": "Fax Witherspoon", + "Model": "Range Rover Sport", + "Color": "Orange", + "Payment Mode": "Credit Card", + "Delivery Date": "2/22/2018", + "Amount": "5284.87" + } + ]; \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/main.ts b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/main.ts new file mode 100644 index 0000000000..37a1e9c190 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/main.ts @@ -0,0 +1,4 @@ +import { bootstrapApplication } from '@angular/platform-browser'; +import { AppComponent } from './app'; +import 'zone.js'; +bootstrapApplication(AppComponent).catch((err) => console.error(err)); \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/styles.css b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/styles.css new file mode 100644 index 0000000000..517366f42c --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/src/styles.css @@ -0,0 +1,15 @@ + +@import 'node_modules/@syncfusion/ej2-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-inputs/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-splitbuttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-lists/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-navigations/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-popups/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-dropdowns/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-grids/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-base/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-spreadsheet/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-buttons/styles/material.css'; +@import 'node_modules/@syncfusion/ej2-angular-splitbuttons/styles/material.css'; \ No newline at end of file diff --git a/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/tsconfig.json b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/tsconfig.json new file mode 100644 index 0000000000..9fa16d6333 --- /dev/null +++ b/Document-Processing/code-snippet/spreadsheet/angular/paste-values-cs1/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "moduleResolution": "node", + "importHelpers": true, + "target": "ES2022", + "module": "ES2022", + "useDefineForClassFields": false, + "lib": [ + "ES2022", + "dom" + ] + }, + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} \ No newline at end of file