diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/accessibility.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/accessibility.md index 97a493c27e..f7e58096d7 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/accessibility.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/accessibility.md @@ -1,17 +1,17 @@ --- layout: post -title: Accessibility in EJ2 ASP.NET CORE Spreadsheet Control -description: "Documentation for the accessibility in the Essential JS2 Spreadsheet, featuring WAI-ARIA standards." +title: Accessibility in React Spreadsheet component | Syncfusion +description: Learn here all about Accessibility in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Accessibility platform: document-processing -control: Accessibility documentation: ug --- -# Accessibility in EJ2 ASP.NET CORE Spreadsheet Control +# Accessibility in React Spreadsheet component -The Spreadsheet control followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility. +The Spreadsheet component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria#roles) that are commonly used to evaluate accessibility. -The accessibility compliance for the Spreadsheet control is outlined below. +The accessibility compliance for the Spreadsheet component is outlined below. | Accessibility Criteria | Compatibility | | -- | -- | @@ -31,15 +31,15 @@ The accessibility compliance for the Spreadsheet control is outlined below. margin: 0.5em 0; } -
Yes - All features of the control meet the requirement.
+
Yes - All features of the component meet the requirement.
-
Intermediate - Some features of the control do not meet the requirement.
+
Intermediate - Some features of the component do not meet the requirement.
-
No - The control does not meet the requirement.
+
No - The component does not meet the requirement.
## WAI-ARIA attributes -The Spreadsheet control followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/alert/) patterns to meet the accessibility. The following ARIA attributes are used in the Spreadsheet control: +The Spreadsheet component followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/alert/) patterns to meet the accessibility. The following ARIA attributes are used in the Spreadsheet component: | Attributes | Purpose | |-------|---------| @@ -61,7 +61,7 @@ The Spreadsheet control followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/ ## Keyboard interaction -The Spreadsheet control followed the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/alert/#keyboardinteraction) guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Spreadsheet control. +The Spreadsheet component followed the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/alert#keyboardinteraction) guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Spreadsheet component. | Press | To do this | |----------|-------------| @@ -107,6 +107,12 @@ The Spreadsheet control followed the [keyboard interaction](https://www.w3.org/W ## Ensuring accessibility -The Spreadsheet control's accessibility levels are ensured through an [accessibility-checker](https://www.npmjs.com/package/accessibility-checker) and [axe-core](https://www.npmjs.com/package/axe-core) software tools during automated testing. +The Spreadsheet component's accessibility levels are ensured through an [accessibility-checker](https://www.npmjs.com/package/accessibility-checker) and [axe-core](https://www.npmjs.com/package/axe-core) software tools during automated testing. -The accessibility compliance of the Spreadsheet control is shown in the following sample. Open the [sample](https://ej2.syncfusion.com/accessibility/spreadsheet.html) in a new window to evaluate the accessibility of the Spreadsheet control with accessibility tools. +The accessibility compliance of the Spreadsheet component is shown in the following sample. Open the [sample](https://ej2.syncfusion.com/accessibility/spreadsheet.html) in a new window to evaluate the accessibility of the Spreadsheet component with accessibility tools. + +{% previewsample "https://ej2.syncfusion.com/accessibility/spreadsheet.html" %} + +## See also + +* [Accessibility in Syncfusion® React components](https://ej2.syncfusion.com/react/documentation/common/accessibility) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/cell-range.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/cell-range.md index 5fa7c090e2..e8c5a58365 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/cell-range.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/cell-range.md @@ -81,92 +81,6 @@ The following features have some limitations in Merge: * Merge with filter. * Merge with wrap text. -## Data Validation - -Data Validation is used to restrict the user from entering the invalid data. You can use the [`allowDataValidation`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowDataValidation) property to enable or disable data validation. - -N> * The default value for `allowDataValidation` property is `true`. - -### Apply Validation - -You can apply data validation to restrict the type of data or the values that users enter into a cell. - -You can apply data validation by using one of the following ways, - -* Select the Data tab in the Ribbon toolbar, and then choose the Data Validation item. -* Use the `addDataValidation()` method programmatically. - -### Clear Validation - -Clear validation feature is used to remove data validations from the specified ranges or the whole worksheet. - -You can clear data validation rule by one of the following ways, - -* Select the Data tab in the Ribbon toolbar, and then choose the Clear Validation item. -* Use the `removeDataValidation()` method programmatically. - -### Highlight Invalid Data - -Highlight invalid data feature is used to highlight the previously entered invalid values. - -You can highlight an invalid data by using one of the following ways, - -* Select the Data tab in the Ribbon toolbar, and then choose the Highlight Invalid Data item. -* Use the `addInvalidHighlight()` method programmatically. - -### Clear Highlighted Invalid Data - -Clear highlight feature is used to remove the highlight from invalid cells. - -You can clear the highlighted invalid data by using the following ways, - -* Select the Data tab in the Ribbon toolbar, and then choose the Clear Highlight item. -* Use the `removeInvalidHighlight()` method programmatically. - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/asp-net-core/data-validation/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="DataValidation.cs" %} -{% include code-snippet/spreadsheet/asp-net-core/data-validation/dataValidation.cs %} -{% endhighlight %} -{% endtabs %} - -### Custom Data validation - -The Spreadsheet supports custom data validation, allowing users to define their own validation rules for specific cells or ranges. This feature enables you to set conditions that the entered data must meet, making it particularly useful when predefined validation options, such as numbers, dates, or lists, are insufficient. - -With custom validation, you can enforce rules using logical expressions or formulas, ensuring that only valid data is entered into the Spreadsheet. - -For example, consider a scenario where you want to ensure that a cell contains a number between 10 and 100. To achieve this, define a validation rule using a formula that checks if the entered value is greater than 10 and less than 100. The formula for this validation is =AND(A1>10, A1<100), where A1 refers to the cell being validated. - -When this rule is applied, the Spreadsheet evaluates the entered value against the formula. If a user enters a value outside the specified range, an alert notifies them of the invalid input. This helps users correct errors efficiently and ensures that only desired values are accepted. - -You can apply custom data validation using two methods. - -* The first is through the Data Validation dialog in the Ribbon toolbar. Navigate to the Data tab, select the Data Validation option, and choose the Custom type from the Allow dropdown menu. -* The second method is programmatically, using the `addDataValidation()` method, which allows developers to set custom rules dynamically via code. - -The following code example demonstrates how to add custom data validation with a formula in a Spreadsheet. - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/asp-net-core/data-validation-cs2/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="DataValidation.cs" %} -{% include code-snippet/spreadsheet/asp-net-core/data-validation-cs2/dataValidation.cs %} -{% endhighlight %} -{% endtabs %} - -### Limitations of Data validation - -The following features have some limitations in Data Validation: - -* Entire row data validation. -* Insert row between the data validation. -* Copy/paste with data validation. -* Delete cells between data validation applied range. - ## Auto Fill Auto Fill is used to fill the cells with data based on adjacent cells. It also follows a pattern from adjacent cells if available. There is no need to enter the repeated data manually. You can use [`allowAutoFill`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowAutoFill) property to enable/disable the auto fill support. You can also use `showFillOptions` property to enable/disable the fill option and `fillType` property to change the default auto fill option which is available in [`autoFillSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AutoFillSettings). diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/data-validation.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/data-validation.md new file mode 100644 index 0000000000..96490c8fe4 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/data-validation.md @@ -0,0 +1,96 @@ +--- +layout: post +title: Data validation in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn here all about Data validation in Syncfusion EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2 and more. +platform: document-processing +control: Data validation +documentation: ug +--- + +# Data validation in ASP.NET Core Spreadsheet component + +Data Validation is used to restrict the user from entering the invalid data. You can use the [`allowDataValidation`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowDataValidation) property to enable or disable data validation. + + +> * The default value for `allowDataValidation` property is `true`. + +## Apply Validation + +You can apply data validation to restrict the type of data or the values that users enter into a cell. + +* **Ribbon UI:** Select the **Data** tab, then choose **Data Validation**. +* **Programmatically:** Use the [`addDataValidation`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#adddatavalidation) method. + + +## Clear Validation + +Clear validation using one of these methods: + +* **Ribbon UI:** Select the **Data** tab, then choose **Clear Validation**. +* **Programmatically:** Use the [`removeDataValidation`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#removedatavalidation) method. + + +## Highlight Invalid Data + +Highlight invalid data feature is used to highlight the previously entered invalid values. + +* **Ribbon UI:** Select the **Data** tab, then choose **Highlight Invalid Data**. +* **Programmatically:** Use the [`addInvalidHighlight`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#addinvalidhighlight) method. + + +## Clear Highlighted Invalid Data + +Clear highlight feature is used to remove the highlight from invalid cells. + +* **Ribbon UI:** Select the **Data** tab, then choose **Clear Highlight**. +* **Programmatically:** Use the [`removeInvalidHighlight`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#removeinvalidhighlight) method. + + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/data-validation/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="DataValidation.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/data-validation/dataValidation.cs %} +{% endhighlight %} +{% endtabs %} + +## Custom Data validation + +The Spreadsheet supports custom data validation, allowing users to define their own validation rules for specific cells or ranges. This feature enables you to set conditions that the entered data must meet, making it particularly useful when predefined validation options, such as numbers, dates, or lists, are insufficient. + +With custom validation, you can enforce rules using logical expressions or formulas, ensuring that only valid data is entered into the Spreadsheet. + +**Example:** Validate a number between 10 and 100 using the formula `=AND(A1>10, A1<100)`, where A1 is the cell being validated. The Spreadsheet evaluates entered values against the formula and displays an alert if validation fails. + +You can apply custom data validation using two methods. + +* **Ribbon UI:** Navigate to **Data** tab, select **Data Validation**, then choose **Custom** from the **Allow** dropdown. +* **Programmatically:** Use the [`addDataValidation`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#adddatavalidation) method. + +The following code example demonstrates how to add custom data validation with a formula in a Spreadsheet. + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/data-validation-cs2/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="DataValidation.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/data-validation-cs2/dataValidation.cs %} +{% endhighlight %} +{% endtabs %} + +## Limitations of Data validation + +The following features have some limitations in Data Validation: + +* Entire row data validation. +* Insert row between the data validation. +* Copy/paste with data validation. +* Delete cells between data validation applied range. + +## See Also + +* [Formatting](./formatting) +* [Rows and columns](./rows-and-columns) +* [Hyperlink](./link) +* [Sorting](./sort) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/editing.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/editing.md index e3188b3266..9f737331cd 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/editing.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/editing.md @@ -12,6 +12,10 @@ documentation: ug You can edit the contents of a cell directly in the cell or by typing in the formula bar. By default, the editing feature is enabled in the spreadsheet. Use the [`allowEditing`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowEditing) property to enable or disable the editing feature. +To get start quickly with Editing, you can check on this video: + +{% youtube "https://www.youtube.com/watch?v=o3hsPhqaZzY" %} + ## Edit cell You can start editing by one of the following ways, @@ -20,7 +24,7 @@ You can start editing by one of the following ways, * Press `F2` key to edit the active cell. * Use formula bar to perform editing. * Use `BACKSPACE` or `SPACE` key to clear the cell content and start the edit mode. -* Using the `startEdit` method. +* Using the [`startEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#startedit) method. ## Save cell @@ -28,16 +32,16 @@ If the cell is in editable state, you can save the edited cell by one of the fol * Perform mouse click on any other cell rather than the current editing cell. * Press `Enter` or `Tab` keys to save the edited cell content. -* Using the `endEdit` method. +* Using the [`endEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#endedit) method. ## Cancel editing To cancel the editing without saving the changes, you can use one of the following ways, * Press `ESCAPE` key, this will remove the editable state and update the unchanged cell content. -* Using the `closeEdit` method. +* Using the [`closeEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#closeedit) method. -The following sample shows how to prevent the editing and cell save. Here `E` column prevent the editing by using cancel argument as true in [`cellEdit`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CellEdit) event. In `D` column, prevent saving the edited changes by using cancel argument as true in [`beforeCellSave`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_BeforeCellSave) and use `closeEdit` method in spreadsheet. +The following sample shows how to prevent the editing and cell save. Here `E` column prevent the editing by using cancel argument as true in [`cellEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#celledit) event. In `D` column, prevent saving the edited changes by using cancel argument as true in [`beforeCellSave`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#beforecellsave) and use [`closeEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#closeedit) method in spreadsheet. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -54,6 +58,10 @@ The following sample shows how to prevent the editing and cell save. Here `E` co * Text overflow in cells is not supported in Editing. +## Note + +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. + ## See Also * [Cell range](./cell-range) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/events.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/events.md new file mode 100644 index 0000000000..339aa03b59 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/events.md @@ -0,0 +1,154 @@ +--- +layout: post +title: Events in EJ2 ASP.NET Core Spreadsheet component | Syncfusion +description: Learn here all about the events in Syncfusion EJ2 ASP.NET Core Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Events +platform: document-processing +documentation: ug +--- + +# Events in ASP.NET Core Spreadsheet Component + +The Spreadsheet component triggers events for creation, data binding, selection, editing, clipboard actions, sorting, filtering, formatting, row and column insertion or deletion, context menu and ribbon interactions, and import/export operations—enabling integration of custom logic into application workflows. + +## Action Events + +The `actionBegin` and `actionComplete` events are the primary action events in the Spreadsheet. + +The `actionBegin` event triggers when any action begins in the Spreadsheet and fires for all user-initiated actions, enabling you to identify the action type, prevent specific actions from executing, and apply custom logic at the initiation of an action. + +The `actionComplete` event triggers when any action completes in the Spreadsheet and fires for all user-initiated actions, enabling you to identify the action type and apply custom logic after an action has successfully completed. + +You can identify the type of action being triggered by using the `args.action` property during both the action events. + +The following table represents the action names for which the `actionBegin` and `actionComplete` events are triggered in the Spreadsheet: + +| **Action** | **ActionBegin** | **ActionComplete** | +|--------|-------------|----------------| +| Add Data Validation | validation | validation | +| Add Defined Name | - | addDefinedName | +| Autofill | autofill | autofill | +| Autofit | resizeToFit | resizeToFit | +| Cell Delete | cellDelete | cellDelete | +| Cell Save (Edit) | cellSave | cellSave | +| Chart Design | chartDesign | chartDesign | +| Chart Deletion | deleteChart | deleteChart | +| Chart Insertion | beforeInsertChart | insertChart | +| Chart (Resize/Drag and Drop) | - | chartRefresh | +| Clear | beforeClear | clear | +| Clear Conditional Formatting | - | clearCF | +| Clear Validation | removeValidation | removeValidation | +| Clear Highlight | removeHighlight | removeHighlight | +| Clipboard (Copy) | copy | - | +| Clipboard (Cut) | cut | - | +| Clipboard (Paste) | clipboard | clipboard | +| Comment | addComment | addComment | +| Conditional Formatting | conditionalFormat | conditionalFormat | +| Delete | delete | delete | +| Delete Comment | deleteComment | deleteComment | +| Delete (Rows/Columns) | delete | delete | +| Filter | filter | filter | +| Formatting (Cell/Number) | format | format | +| Freeze Panes | freezePanes | freezePanes | +| Gridlines | gridlines | gridlines | +| Headers | headers | headers | +| Hide (Row/Column) | hideShow | hideShow | +| Highlight Invalid Data | addHighlight | addHighlight | +| Hyperlink | hyperlink | hyperlink | +| Image Deletion | deleteImage | deleteImage | +| Image Insertion | beforeInsertImage | insertImage | +| Image (Resize/Drag and Drop) | - | imageRefresh | +| Insert (Row/Column/Sheet) | insert | insert | +| Merge | merge | merge | +| Open | beforeOpen | import | +| Protect Sheet | protectSheet | protectSheet | +| Read-Only | readonly | readonly | +| Remove Defined Name | - | removeDefinedName | +| Replace | beforeReplace | replace | +| Replace All | beforeReplaceAll | replaceAll | +| Resize (Row/Column) | - | resize | +| Save | beforeSave | - | +| Sort | beforeSort | sorting | +| Sheet Duplicate | duplicateSheet | duplicateSheet | +| Sheet Hide | hideSheet | hideSheet | +| Sheet Move | moveSheet | moveSheet | +| Sheet Rename | renameSheet | renameSheet | +| Wrap | beforeWrap | wrap | + + +The following code example demonstrates how to bind the `actionBegin` and `actionComplete` events in the Spreadsheet. + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/events/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/events/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/react/events" %} + +## Clipboard + +When performing clipboard operations such as **Cut**, **Copy**, or **Paste**, the Spreadsheet triggers specific events that allow you to monitor and manage these actions effectively. The following sections outline the event sequence and their roles. + +### Cut / Copy + +For **Cut** or **Copy** actions, only the [`actionBegin`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin) event is triggered. You can identify the action type and access the copied range by using the following properties: + +* `args.action === 'cut'` → Indicates a Cut action +* `args.action === 'copy'` → Indicates a Copy action +* `args.args.copiedRange` → Provides the range of copied cells + +### Paste + +During a **Paste** operation, events are triggered in the following sequence: + +> actionBegin → beforeCellUpdate → cellSave → actionComplete + +The table below describes each event and its role in the paste process: + +| **Event** | **Description** | **Event Arguments** | +|-----------|------------------|----------------------| +| [`actionBegin`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin) | Triggers when the paste action starts. | [`ActionBeginEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin) | +| [`beforeCellUpdate`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#beforecellupdate) | Triggers for each cell in the pasted range before it is updated, allowing you to modify cell properties or cancel the `paste` action. | [`BeforeCellUpdateArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/beforecellupdateargs) | +| [`cellSave`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#cellsave) | Triggers for each cell in the pasted range after the modified cell is saved. | [`CellSaveEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/cellsaveeventargs) | +| [`actionComplete`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actioncomplete) | Triggers after all pasted cells are fully saved. | [`ActionCompleteEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actioncomplete) | + +### Accessing copied and pasted ranges + +You can access the copied and pasted ranges during paste operations by using the [`actionBegin`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin) and [`actionComplete`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actioncomplete) events. Verify the action type using: + +* `args.action === 'clipboard'` → Indicates a paste action + +Once verified, you can access the following properties: + +* `args.eventArgs.copiedRange` → The range of cells that were copied +* `args.eventArgs.pastedRange` → The range of cells where content was pasted + +## Editing + +When a cell is edited manually—such as by **double-clicking the cell**, **pressing the F2 key**, or **modifying it through the formula bar**—the Spreadsheet triggers a series of events. These events allow you to monitor and manage the entire editing process, from initiation to completion. + +The sequence of events during manual cell editing is: + +> cellEdit → cellEditing → actionBegin → beforeCellUpdate → beforeCellSave → cellSave → cellEdited → actionComplete + +The table below describes each event and its role in the editing process: + +| **Event** | **Description** | **Event Arguments** | +|-----------|------------------|----------------------| +| [`cellEdit`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#celledit) | Triggers before the cell enters edit mode. | [`CellEditEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/cellediteventargs) | +| [`cellEditing`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#cellediting) | Triggers while editing is in progress; fires for each change made to the cell content. | [`CellEditingEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/cellediteventargs) | +| [`actionBegin`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin) | Triggers when the edit action starts. | [`ActionBeginEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actionbegin) | +| [`beforeCellUpdate`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#beforecellupdate) | Triggers before any cell property (style, value, formula, etc.) is modified. | [`BeforeCellUpdateArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/beforecellupdateargs) | +| [`beforeCellSave`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#beforecellsave) | Triggers before the cell value is saved. | [`BeforeCellSaveEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/cellediteventargs) | +| [`cellSave`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#cellsave) | Triggers when the modified cell value is saved. | [`CellSaveEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/cellsaveeventargs) | +| [`cellEdited`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#celledited) | Triggers after the editing process completes. | [`CellEditedEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/cellediteventargs) | +| [`actionComplete`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actioncomplete) | Triggers once the entire edit operation is completed. | [`ActionCompleteEventArgs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/index-default#actioncomplete) | + +## See Also + +* [Editing](./editing.md) +* [Clipboard](./clipboard.md) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/feature-list.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/feature-list.md index f2eacf9d6e..81a5bc02c7 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/feature-list.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/feature-list.md @@ -7,63 +7,70 @@ control: Feature List documentation: ug --- +# Feature list in EJ2 ASP.NET Core Spreadsheet component -# Comparison between EJ1 & EJ2 ASP.NET Core Spreadsheet features +The following table shows the features available in our Syncfusion EJ2 Spreadsheet. -The following table compares Excel functionality with the availability of EJ1 and EJ2 Spreadsheet features. - -| **Features** | **Available in EJ1 Spreadsheet** | **Available in EJ2 Spreadsheet** | **Comments** | -| --- | --- | --- | --- | -| Ribbon | Yes | Yes | - | -| Formula bar | Yes | Yes | - | -| Sheet tab | Yes | Yes | - | -| Show / Hide gridlines and header | Yes | Yes | - | -| Scrolling | Partially | Yes | - | -| Selection | Yes | Yes | - | -| Editing | Yes | Yes | - | -| Formulae | Yes | Partially | EJ2 supports limited number of [`most used formulas`](https://ej2.syncfusion.com/aspnetcore/documentation/spreadsheet/formulas#supported-formulas) | -| Named range | Yes | Partially | EJ2 Spreadsheet Named range supports only in workbook scope | -| Data Binding | Yes | Yes | - | -| Formatting | Yes | Yes | - | -| Context menu | Yes | Yes | - | -| Keyboard navigation | Yes | Yes | - | -| Keyboard shortcuts | Yes | Yes | - | -| Sorting | Yes | Yes | - | -| Filtering | Yes | Yes | - | -| Hyperlink | Yes | Yes | - | -| Undo & redo | Yes | Yes | - | -| Open and Save | Yes | Yes | - | -| Resize / Autofit | Yes | Yes | - | -| Clipboard | Yes | Yes | - | -| Collaborative editing | No | Yes | - | -| Wrap text | Yes | Yes | - | -| Template | No | Yes | - | -| Merge cells | Yes | Yes | - | -| Show / Hide rows and columns | Yes | Yes | - | -| Sheet customizations | Yes | Partially | Move or copy sheet is not supported in EJ2 spreadsheet. | -| Data Validation | Yes | Yes | - | -| Table | Yes | No | - | -| Chart | Yes | Yes | - | -| Image | Yes | Yes | - | -| Conditional formatting | Yes | Yes | - | -| Freeze Pane | Yes | Yes | - | -| Scaling | No | No | - | -| Print | Yes | No | - | -| Grouping | No | No | - | -| Autofill | Yes | No | - | -| Auto Sum | Yes | Yes | - | -| Format painter | Yes | No | - | -| Cell Style | Yes | Partially | We can only customize the cell style in EJ2 Spreadsheet through API. | -| Protection | Yes | Partially | Custom encryption is not supported in EJ2 Spreadsheet's protect workbook. | -| Find and replace | Yes | Yes | - | -| Drag and Drop | Yes | No | - | -| Notes | Yes | No | - | -| Comments | No | No | - | -| Pivot table | Yes | No | - | -| Sparklines | Yes | No | - | -| Form controls | Yes | No | - | -| Shapes | No | No | - | -| Clear | Yes | Yes | - | +| **Features** | **Available in EJ2 Spreadsheet** | **Comments** | +| --- | --- | --- | +| Ribbon | Yes | - | +| Formula bar | Yes | - | +| Sheet tab | Yes | - | +| Show / Hide gridlines and header | Yes | - | +| Scrolling | Yes | - | +| Selection | Yes | - | +| Editing | Yes | - | +| Formulae | Partially | EJ2 supports limited number of [`most used formulas`](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/formulas#supported-formulas) | +| Named range | Yes | - | +| Data Binding | Yes | - | +| Cell Formatting | Yes | - | +| Number Formatting | Yes | - | +| Context menu | Yes | - | +| Keyboard navigation | Yes | - | +| Keyboard shortcuts | Yes | - | +| Sorting | Yes | - | +| Filtering | Yes | - | +| Hyperlink | Yes | - | +| Undo & redo | Yes | - | +| Import | Yes | - | +| Export | Yes | - | +| Resize / Autofit | Yes | - | +| Clipboard | Yes | - | +| Collaborative editing | No | - | +| Wrap text | Yes | - | +| Template | Yes | - | +| Merge cells | Yes | - | +| Show / Hide rows and columns | Yes | - | +| Sheet customizations | Yes | - | +| Data Validation | Yes | - | +| Table | No | - | +| Chart | Yes | - | +| Image | Yes | - | +| Conditional formatting | Yes | - | +| Freeze Pane | Yes | - | +| Scaling | No | - | +| Print | Yes | - | +| Grouping | No | - | +| Autofill | Yes | - | +| Auto Sum | Yes | - | +| Format painter | No | - | +| Cell Style | Yes | - | +| Protection | Yes | - | +| Find and replace | Yes | - | +| Drag and Drop | Partially | EJ2 spreadsheet supports drag and drop of images and charts | +| Notes | Yes | - | +| Comments | Yes | - | +| Pivot table | No | - | +| Sparklines | No | - | +| Form controls | No | - | +| Shapes | No | - | +| Clear | Yes | - | +| Insert / Delete rows, columns and sheets | Yes | - | +| Sheet Visibility | Yes | - | +| Ribbon Customization | Yes | - | +| Theme and style options | Yes | - | +| Accessibility | Yes | - | +| Touch-Friendly Interactions | Yes | - | ## See Also diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/filter.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/filter.md index 4c809f5cf2..aa49eebe4e 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/filter.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/filter.md @@ -12,27 +12,27 @@ documentation: ug Filtering helps you to view specific rows in the spreadsheet by hiding the other rows. You can use the [`allowFiltering`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property to enable or disable filtering functionality. -N> * The default value for `allowFiltering` property is `true`. +> * The default value for `allowFiltering` property is `true`. -By default, the `filter` module is injected internally into Spreadsheet to perform filtering. +By default, the `Filter` module is injected internally into Spreadsheet to perform filtering. ## Apply filter on UI -In the active Spreadsheet, select a range of cells to filter by value of the cell. The filtering can be done by any of the following ways: +In the active sheet, select a range of cells to filter by value of the cell. The filtering can be done by any of the following ways: * Select the filter item in the Ribbon toolbar. * Right-click the sheet, select the filter item in the context menu. -* Use the `applyFilter()` method programmatically. +* Use the [`applyFilter`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#applyfilter) method programmatically. * Use `Ctrl + Shift + L` keyboard shortcut to apply the filter. -N> * Use `Alt + Up/Down` keyboard shortcut to open the filter dialog. +> * Use `Alt + Up/Down` keyboard shortcut to open the filter dialog. ## Filter by criteria -The `applyFilter()` method will apply the filter UI, based on the predicate and range given in the arguments. +The [`applyFilter`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#applyfilter) method will apply the filter UI, based on the predicate and range given in the arguments. -N> * The `beforeFilter` event will be triggered before filtering the specified range. -
* The `filterComplete` event will be triggered after the filter action is completed successfully. +> * The [`beforeFilter`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#beforefilter) event will be triggered before filtering the specified range. +> * The [`filterComplete`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#filtercomplete) event will be triggered after the filter action is completed successfully. The following code example shows `filter` functionality in the Spreadsheet control. @@ -45,8 +45,6 @@ The following code example shows `filter` functionality in the Spreadsheet contr {% endhighlight %} {% endtabs %} - - ## Filter by cell value To apply a filter for a cell value, right-click the cell and choose filter -> `Filter By Selected Cell's Value` option from the menu. It applies the filter based on the value of the selected cell in the current sheet. @@ -57,7 +55,7 @@ After applying filter to a certain column, you may want to clear it to make all * Choose `Clear` option in ribbon toolbar under `Filter and Sort`. It clears the filters applied in the spreadsheet for all fields. -* Use the `clearFilter()` method programmatically, to clear the applied filters in spreadsheet for all fields. +* Use the [`clearFilter`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#clearfilter) method programmatically, to clear the applied filters in spreadsheet for all fields. ## Clear filter on a field @@ -65,7 +63,7 @@ After filtering, you can clear/reset the filter for a field alone. It can be don * Click filter icon in the column’s header and then choose `Clear Filter` option from the filter dialog. * You can right-click on a filtered column cell and choose `Clear Filter from .` option from the context menu. -* Use the `clearFilter(field)` method programmatically, to clear the filter in a particular column. +* Use the [`clearFilter(field)`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#clearfilter) method programmatically, to clear the filter in a particular column. ## Reapply filter @@ -81,7 +79,7 @@ The following errors have been handled for filtering, ## Get data from filtered rows -Filtering allows you to view specific rows in a spreadsheet while hiding the others. The [allowFiltering](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property allows you to enable or disable filtering functionality through the UI. You can also use the [allowFiltering](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property and `applyFilter` method combination to filter data via code behind. The filtered rows can be identified by iterating through the row collection on the sheet and using the `isFiltered` property available in each row object. +Filtering allows you to view specific rows in a spreadsheet while hiding the others. The [`allowFiltering`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property allows you to enable or disable filtering functionality through the UI. You can also use the [`allowFiltering`](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFiltering) property and [`applyFilter`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#applyfilter) method combination to filter data via code behind. The filtered rows can be identified by iterating through the row collection on the sheet and using the `isFiltered` property available in each row object. The following code example shows how to get the filtered rows. @@ -101,9 +99,14 @@ The following features have some limitations in Filter: * Insert/delete row/column between the filter applied cells. * Merge cells with filter. * Copy/cut paste the filter applied cells. +* Filter by color is not supported. + +## Note + +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. ## See Also * [Sorting](./sort) * [Hyperlink](./link) -* [Undo Redo](./undo-redo) \ No newline at end of file +* [Undo Redo](./undo-redo) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formatting.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formatting.md index 5899a39b51..6c57819a80 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formatting.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formatting.md @@ -7,7 +7,6 @@ control: Formatting documentation: ug --- - # Formatting in ASP.NET Core Spreadsheet Control Formatting options make your data easier to view and understand. The different types of formatting options in the Spreadsheet are, @@ -15,6 +14,10 @@ Formatting options make your data easier to view and understand. The different t * Text Formatting * Cell Formatting +To get start quickly with Formatting, you can check on this video: + +{% youtube "https://www.youtube.com/watch?v=AyHLgzNq6_w" %} + ## Number Formatting Number formatting provides a type for your data in the Spreadsheet. Use the [`allowNumberFormatting`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowNumberFormatting) property to enable or disable the number formatting option in the Spreadsheet. The different types of number formatting supported in Spreadsheet are, @@ -34,13 +37,13 @@ Number formatting provides a type for your data in the Spreadsheet. Use the [`al | Text | `@` | 49 | Number formatting can be applied in following ways, -* Using the `format` property in `cell`, you can set the desired format to each cell at initial load. -* Using the `numberFormat` method, you can set the number format to a cell or range of cells. +* Using the [format](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/cell#format) property in `cell`, you can set the desired format to each cell at initial load. +* Using the [`numberFormat`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#numberformat) method, you can set the number format to a cell or range of cells. * Selecting the number format option from ribbon toolbar. ### Custom Number Formatting -Spreadsheet supports custom number formats to display your data as numbers, dates, times, percentages, and currency values. If the pre-defined number formats do not meet your needs, you can set your own custom formats using custom number formats dialog or `numberFormat` method. +Spreadsheet supports custom number formats to display your data as numbers, dates, times, percentages, and currency values. If the pre-defined number formats do not meet your needs, you can set your own custom formats using custom number formats dialog or [`numberFormat`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#numberformat) method. The different types of custom number format populated in the custom number format dialog are, @@ -84,7 +87,7 @@ The different types of custom number format populated in the custom number forma | Accounting | `_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)` | 43 | Custom Number formatting can be applied in following ways, -* Using the `numberFormat` method, you can set your own custom number format to a cell or range of cells. +* Using the [`numberFormat`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#numberformat) method, you can set your own custom number format to a cell or range of cells. * Selecting the custom number format option from custom number formats dialog or type your own format in dialog input and then click apply button. It will apply the custom format for selected cells. The following code example shows the number formatting in cell data. @@ -98,11 +101,11 @@ The following code example shows the number formatting in cell data. {% endhighlight %} {% endtabs %} -## Configure culture-based custom format +## Configure Culture-specific Custom format -Previously, the custom format dialog always displayed formats using the English settings (group separator, decimal separator, and currency symbol were not updated based on the applied culture). Starting from version `27.1.*`, the custom format dialog will now display formats according to the applied culture. You can select a culture-based number format from the dialog or enter your own format using the culture-specific decimal separator, group separator, and currency symbol. Then, click "Apply" to apply the culture-specific custom format to the selected cells. +Earlier, the custom format dialog always showed formats using English settings (group separator, decimal separator, and currency symbol were not updated based on the applied culture). Starting from version **27.1.\***, the dialog now displays formats according to the applied culture. You can select a culture-based number format or enter your own format using the culture-specific decimal separator, group separator, and currency symbol. After that, click **Apply** to apply the culture-specific custom format to the selected cells. -The spreadsheet allows customization of formats in the custom format dialog using the `configureLocalizedFormat` method. In this method, you need to pass a collection containing the default number format IDs and their corresponding format codes as arguments. Based on this collection, the custom format dialog will display the customized formats. You can refer to the [default number format IDs](https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformat?view=openxml-2.8.1) from the Excel built-in number format reference. +The Spreadsheet supports customizing formats in the dialog using the `configureLocalizedFormat` method. In this method, you pass a collection of default number format IDs along with their corresponding format codes. The dialog will then display the customized formats. You can refer to the [default number format IDs](https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.numberingformat?view=openxml-2.8.1) from the Excel built-in number format reference. Compared to Excel, the date, time, currency, and accounting formats vary across different cultures. For example, when an Excel file with the date format `'m/d/yyyy'` is imported in the `en-US` culture, the spreadsheet displays the date in that format. However, when the same file is imported in the German culture, the date format changes to `'dd.MM.yyyy'`, which is the default for that region. The default number format ID for the date is 14. To customize the date format based on the culture, you should map the default number format ID to the appropriate culture-specific format code, like this: `{ id: 14, code: 'dd.MM.yyyy' }` in the `configureLocalizedFormat` method. @@ -110,36 +113,47 @@ Compared to Excel, the date, time, currency, and accounting formats vary across The code below illustrates how culture-based format codes are mapped to their corresponding number format ID for the `German` culture. -```csharp -List deLocaleFormats = new List() -{ - new { id = 37, code = @"#,##0;-#,##0" }, - new { id = 38, code = @"#,##0;[Red]-#,##0" }, - new { id = 39, code = @"#,##0.00;-#,##0.00" }, - new { id = 40, code = @"#,##0.00;[Red]-#,##0.00" }, - new { id = 5, code = @"#,##0 ""€"";-#,##0 ""€""" }, - new { id = 6, code = @"#,##0 ""€"";[Red]-#,##0 ""€""" }, - new { id = 7, code = @"#,##0.00 ""€"";-#,##0.00 ""€""" }, - new { id = 8, code = @"#,##0.00 ""€"";[Red]-#,##0.00 ""€""" }, - new { id = 41, code = @"_-* #,##0_-;-* #,##0_-;_-* ""-""_-;_-@_-" }, - new { id = 42, code = @"_-* #,##0 ""€""_-;-* #,##0 ""€""_-;_-* ""-"" ""€""_-;_-@_-" }, - new { id = 43, code = @"_-* #,##0.00_-;-* #,##0.00_-;_-* ""-""??_-;_-@_-" }, - new { id = 44, code = @"_-* #,##0.00 ""€""_-;-* #,##0.00 ""€""_-;_-* ""-""?? ""€""_-;_-@_-" }, - new { id = 14, code = @"dd.MM.yyyy" }, - new { id = 15, code = @"dd. MMM yy" }, - new { id = 16, code = @"dd. MMM" }, - new { id = 17, code = @"MMM yy" }, - new { id = 20, code = @"hh:mm" }, - new { id = 21, code = @"hh:mm:ss" }, - new { id = 22, code = @"dd.MM.yyyy hh:mm" } -}; -ViewBag.deLocaleFormats = deLocaleFormats; +```js +@using Syncfusion.EJ2.Spreadsheet + +@{ + // Culture-specific formats for "de" locale + List deLocaleFormats = new List() + { + new { id = 14, code = @"dd.MM.yyyy" }, + new { id = 15, code = @"dd. MMM yy" }, + new { id = 16, code = @"dd. MMM" }, + new { id = 17, code = @"MMM yy" }, + new { id = 20, code = @"hh:mm" }, + new { id = 21, code = @"hh:mm:ss" }, + new { id = 22, code = @"dd.MM.yyyy hh:mm" }, + new { id = 37, code = @"#,##0;-#,##0" }, + new { id = 38, code = @"#,##0;[Red]-#,##0" }, + new { id = 39, code = @"#,##0.00;-#,##0.00" }, + new { id = 40, code = @"#,##0.00;[Red]-#,##0.00" }, + new { id = 5, code = @"#,##0 ""€"";-#,##0 ""€""" }, + new { id = 6, code = @"#,##0 ""€"";[Red]-#,##0 ""€""" }, + new { id = 7, code = @"#,##0.00 ""€"";-#,##0.00 ""€""" }, + new { id = 8, code = @"#,##0.00 ""€"";[Red]-#,##0.00 ""€""" }, + new { id = 41, code = @"_-* #,##0_-;-* #,##0_-;_-* ""-""_-;_-@_-" }, + new { id = 42, code = @"_-* #,##0 ""€""_-;-* #,##0 ""€""_-;_-* ""-"" ""€""_-;_-@_-" }, + new { id = 43, code = @"_-* #,##0.00_-;-* #,##0.00_-;_-* ""-""??_-;_-@_-" }, + new { id = 44, code = @"_-* #,##0.00 ""€""_-;-* #,##0.00 ""€""_-;_-* ""-""?? ""€""_-;_-@_-" } + }; + + ViewBag.deLocaleFormats = deLocaleFormats; +} + + ``` The following code example demonstrates how to configure culture-based formats for different cultures in the spreadsheet. @@ -153,12 +167,14 @@ The following code example demonstrates how to configure culture-based formats f {% endhighlight %} {% endtabs %} -## Text and cell formatting +## Cell Styling and Text Formatting + +Text and cell formatting improves the appearance of your spreadsheet and helps highlight specific cells or ranges. You can apply formats such as font size, font family, font color, text alignment, borders, and more. Use the [`allowCellFormatting`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowCellFormatting) property to enable or disable text and cell formatting in the Spreadsheet. -Text and cell formatting enhances the look and feel of your cell. It helps to highlight a particular cell or range of cells from a whole workbook. You can apply formats like font size, font family, font color, text alignment, border etc. to a cell or range of cells. Use the [`allowCellFormatting`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowCellFormatting) property to enable or disable the text and cell formatting option in Spreadsheet. You can set the formats in following ways, -* Using the `style` property, you can set formats to each cell at initial load. -* Using the `cellFormat` method, you can set formats to a cell or range of cells. -* You can also apply by clicking the desired format option from the ribbon toolbar. +You can set formats in the following ways: +* Use the [style](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Cell.html#Syncfusion_EJ2_Spreadsheet_Cell_Style) property to apply formats to each cell during the initial load. +* Use the [`cellFormat`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#cellformat) method to apply formats to a cell or range of cells dynamically. +* Apply formatting directly by clicking the desired format option from the ribbon toolbar. ### Fonts @@ -166,15 +182,15 @@ Various font formats supported in the spreadsheet are font-family, font-size, bo ### Text Alignment -You can align text in a cell either vertically or horizontally using the `textAlign` and `verticalAlign` property. +You can align text in a cell either vertically or horizontally using the [`textAlign`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.TextAlign.html) and [verticalAlign](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.VerticalAlign.html) property. ### Indents -To enhance the appearance of text in a cell, you can change the indentation of a cell content using `textIndent` property. +To enhance the appearance of text in a cell, you can change the indentation of a cell content using [textIndent](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.CellStyleModel.html#Syncfusion_EJ2_Spreadsheet_CellStyleModel_TextIndent) property. ### Fill color -To highlight cell or range of cells from whole workbook you can apply background color for a cell using `backgroundColor` property. +To highlight cell or range of cells from whole workbook you can apply background color for a cell using [backgroundColor](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.CellStyleModel.html#Syncfusion_EJ2_Spreadsheet_CellStyleModel_BackgroundColor) property. ### Borders @@ -182,32 +198,32 @@ You can add borders around a cell or range of cells to define a section of works | Types | Actions | |-------|---------| -| Top Border | Specifies the top border of a cell or range of cells.| -| Left Border | Specifies the left border of a cell or range of cells.| -| Right Border | Specifies the right border of a cell or range of cells.| -| Bottom Border | Specifies the bottom border of a cell or range of cells.| -| No Border | Used to clear the border from a cell or range of cells.| -| All Border | Specifies all border of a cell or range of cells.| -| Horizontal Border | Specifies the top and bottom border of a cell or range of cells.| -| Vertical Border | Specifies the left and right border of a cell or range of cells.| -| Outside Border | Specifies the outside border of a range of cells.| -| Inside Border | Specifies the inside border of a range of cells.| +| **Top Border** | Specifies the top border of a cell or range of cells.| +| **Left Border** | Specifies the left border of a cell or range of cells.| +| **Right Border** | Specifies the right border of a cell or range of cells.| +| **Bottom Border** | Specifies the bottom border of a cell or range of cells.| +| **No Border** | Used to clear the border from a cell or range of cells.| +| **All Border** | Specifies all border of a cell or range of cells.| +| **Horizontal Border** | Specifies the top and bottom border of a cell or range of cells.| +| **Vertical Border** | Specifies the left and right border of a cell or range of cells.| +| **Outside Border** | Specifies the outside border of a range of cells.| +| **Inside Border** | Specifies the inside border of a range of cells.| You can also change the color, size, and style of the border. The size and style supported in the spreadsheet are, | Types | Actions | |-------|---------| -| Thin | Specifies the `1px` border size (default).| -| Medium | Specifies the `2px` border size.| -| Thick | Specifies the `3px` border size.| -| Solid | Used to create the `solid` border (default).| -| Dashed | Used to create the `dashed` border.| -| Dotted | Used to create the `dotted` border.| -| Double | Used to create the `double` border.| +| **Thin** | Specifies the `1px` border size (default).| +| **Medium** | Specifies the `2px` border size.| +| **Thick** | Specifies the `3px` border size.| +| **Solid** | Used to create the `solid` border (default).| +| **Dashed** | Used to create the `dashed` border.| +| **Dotted** | Used to create the `dotted` border.| +| **Double** | Used to create the `double` border.| Borders can be applied in the following ways, * Using the `border`, `borderLeft`, `borderRight`, `borderBottom` properties, you can set the desired border to each cell at initial load. -* Using the `setBorder` method, you can set various border options to a cell or range of cells. +* Using the [setBorder](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#setborder) method, you can set various border options to a cell or range of cells. * Selecting the border options from ribbon toolbar. The following code example shows the style formatting in text and cells of the spreadsheet. @@ -221,8 +237,6 @@ The following code example shows the style formatting in text and cells of the s {% endhighlight %} {% endtabs %} - - ### Limitations of Formatting The following features are not supported in Formatting: @@ -232,16 +246,16 @@ The following features are not supported in Formatting: ## Conditional Formatting -Conditional formatting helps you to format a cell or range of cells based on the conditions applied. You can enable or disable conditional formats by using the `allowConditionalFormat` property. +Conditional formatting helps you to format a cell or range of cells based on the conditions applied. You can enable or disable conditional formats by using the [`allowConditionalFormat`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowConditionalFormat) property. -N> * The default value for the `allowConditionalFormat` property is `true`. +> * The default value for the `allowConditionalFormat` property is `true`. ### Apply Conditional Formatting You can apply conditional formatting by using one of the following ways, * Select the conditional formatting icon in the Ribbon toolbar under the Home Tab. -* Using the `conditionalFormat` method to define the condition. +* Using the [`conditionalFormat()`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#conditionalformat) method to define the condition. * Using the `conditionalFormats` in sheets model. Conditional formatting has the following types in the spreadsheet, @@ -252,15 +266,15 @@ Highlight cells rules option in the conditional formatting enables you to highli The following options can be given for the highlight cells rules as type, -N>* 'GreaterThan', 'LessThan', 'Between', 'EqualTo', 'ContainsText', 'DateOccur', 'Duplicate', 'Unique'. +>* `GreaterThan`, `LessThan`, `Between`, `EqualTo`, `ContainsText`, `DateOccur`, `Duplicate`, `Unique`. The following preset colors can be used for formatting styles, -N>* `"RedFT"` - Light Red Fill with Dark Red Text, -
* `"YellowFT"` - Yellow Fill with Dark Yellow Text, -
* `"GreenFT"` - Green Fill with Dark Green Tex/t, -
* `"RedF"` - Red Fill, -
* `"RedT"` - Red Text. +>* `"RedFT"` - Light Red Fill with Dark Red Text, +>* `"YellowFT"` - Yellow Fill with Dark Yellow Text, +>* `"GreenFT"` - Green Fill with Dark Green Text, +>* `"RedF"` - Red Fill, +>* `"RedT"` - Red Text. ### Top bottom rules @@ -268,7 +282,7 @@ Top bottom rules option in the conditional formatting allows you to apply format The following options can be given for the top bottom rules as type, -N>* 'Top10Items', 'Bottom10Items', 'Top10Percentage', 'Bottom10Percentage', 'BelowAverage', 'AboveAverage'. +>* `Top10Items`, `Bottom10Items`, `Top10Percentage`, `Bottom10Percentage`, `BelowAverage`, `AboveAverage`. ### Data Bars @@ -276,7 +290,7 @@ You can apply data bars to represent the data graphically inside a cell. The lon The following options can be given for the data bars as type, -N>* 'BlueDataBar', 'GreenDataBar', 'RedDataBar', 'OrangeDataBar', 'LightBlueDataBar', 'PurpleDataBar'. +>* `BlueDataBar`, `GreenDataBar`, `RedDataBar`, `OrangeDataBar`, `LightBlueDataBar`, `PurpleDataBar`. ### Color Scales @@ -284,7 +298,7 @@ Using color scales, you can format your cells with two or three colors, where di The following options can be given for the color scales as type, -N>* 'GYRColorScale', 'RYGColorScale', 'GWRColorScale', 'RWGColorScale', 'BWRColorScale', 'RWBColorScale', 'WRColorScale', 'RWColorScale', 'GWColorScale', 'WGColorScale', 'GYColorScale', 'YGColorScale'. +>* `GYRColorScale`, `RYGColorScale`, `GWRColorScale`, `RWGColorScale`, `BWRColorScale`, `RWBColorScale`, `WRColorScale`, `RWColorScale`, `GWColorScale`, `WGColorScale`, `GYColorScale`, `YGColorScale`. ### Icon Sets @@ -292,22 +306,22 @@ Icon sets will help you to visually represent your data with icons. Every icon r The following options can be given for the icon sets as type, -N>* 'ThreeArrows', 'ThreeArrowsGray', 'FourArrowsGray', 'FourArrows', 'FiveArrowsGray', 'FiveArrows', 'ThreeTrafficLights1', 'ThreeTrafficLights2', 'ThreeSigns', 'FourTrafficLights', 'FourRedToBlack', 'ThreeSymbols', 'ThreeSymbols2', 'ThreeFlags', 'FourRating', 'FiveQuarters', 'FiveRating', 'ThreeTriangles', 'ThreeStars', 'FiveBoxes'. +>* `ThreeArrows`, `ThreeArrowsGray`, `FourArrowsGray`, `FourArrows`, `FiveArrowsGray`, `FiveArrows`, `ThreeTrafficLights1`, `ThreeTrafficLights2`, `ThreeSigns`, `FourTrafficLights`, `FourRedToBlack`, `ThreeSymbols`, `ThreeSymbols2`, `ThreeFlags`, `FourRating`, `FiveQuarters`, `FiveRating`, `ThreeTriangles`, `ThreeStars`, `FiveBoxes`. ### Custom Format -Using custom format for conditional formatting you can set cell styles like color, background color, font style, font weight and underline. +Using the custom format for conditional formatting you can set cell styles like color, background color, font style, font weight, and underline. In the MAY and JUN columns, we have applied conditional formatting custom format. -N> * In the Conditional format, custom format supported for Highlight cells rules and Top bottom rules. +>* In the Conditional format, custom format supported for **Highlight cell rules** and **Top bottom rules**. ### Clear Rules You can clear the defined rules by using one of the following ways, -* Using the “Clear Rules” option in the Conditional Formatting button of HOME Tab in the ribbon to clear the rule from selected cells. -* Using the `clearConditionalFormat` method to clear the defined rules. +* Using the `Clear Rules` option in the Conditional Formatting button of HOME Tab in the ribbon to clear the rule from selected cells. +* Using the [`clearConditionalFormat`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#clearconditionalformat) method to clear the defined rules. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -318,8 +332,6 @@ You can clear the defined rules by using one of the following ways, {% endhighlight %} {% endtabs %} - - ### Limitations of Conditional formatting The following features have some limitations in Conditional Formatting: @@ -329,6 +341,10 @@ The following features have some limitations in Conditional Formatting: * Copy and paste the conditional formatting applied cells. * Custom rule support. +## Note + +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. + ## See Also * [Rows and columns](./rows-and-columns) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formulas.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formulas.md index 481f40a2da..cf2f0529b4 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formulas.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/formulas.md @@ -1,4 +1,3 @@ ---- layout: post title: Formulas in EJ2 ASP.NET Core Syncfusion Spreadsheet Component description: Learn here all about Formulas in Syncfusion EJ2 ASP.NET CORE Spreadsheet component of Syncfusion Essential JS 2 and more. @@ -10,26 +9,26 @@ documentation: ug # Formulas in ASP.NET Core Spreadsheet control -Formulas are used for calculating the data in a worksheet. You can refer the cell reference from same sheet or from different sheets. +Formulas are used to perform calculations on data in a worksheet. You can refer the cell reference from same sheet or from different sheets. ## Usage -You can set formula for a cell in the following ways, +You can set a formula for a cell in the following ways, -* Using the `formula` property from `cell`, you can set the formula or expression to each cell at initial load. +* Using the [formula](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Cell.html#Syncfusion_EJ2_Spreadsheet_Cell_Formula) property from `cell`, you can set the formula or expression to each cell at initial load. * Set the formula or expression through data binding. * You can set formula for a cell by [`editing`](./editing). -* Using the `updateCell` method, you can set or update the cell formula. +* Using the [`updateCell`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#updatecell) method, you can set or update the cell formula. -## Culture-Based Argument Separator +## Culture-Specific Formula Separators -Previously, although you could import culture-based Excel files into the Spreadsheet control, the formulas wouldn't calculate correctly. This was due to the absence of culture-based argument separators and support for culture-based formatted numeric values as arguments. However, starting from version 25.1.35, you can now import culture-based Excel files into the Spreadsheet component. +In earlier versions, even though culture-based Excel files could be imported into the Spreadsheet component, formulas did not calculate correctly. This happened because culture-based argument separators and support for culture-based formatted numeric values were not available. Starting from version **25.1.35**, you can now import culture-based Excel files into the Spreadsheet component with proper support. -> Before importing culture-based Excel files, ensure that the Spreadsheet control is rendered with the corresponding culture. Additionally, launch the import/export services with the same culture to ensure compatibility. +> Before importing culture-based Excel files, make sure the Spreadsheet component is rendered with the matching culture. Also, start the import/export services with the same culture to ensure compatibility. -When loading spreadsheet data with culture-based formula argument separators using cell data binding, local/remote data, or JSON, ensure to set the [listSeparator](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ListSeparator) property value as the culture-based list separator from your end. Additionally, note that when importing an Excel file, the [listSeparator](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.spreadsheet.spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ListSeparator) property will be updated based on the culture of the launched import/export service. +When loading spreadsheet data with culture-based formula argument separators using cell data binding, local/remote data, or JSON, ensure to set the [listSeparator](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ListSeparator) property value as the culture-based list separator from your end. Additionally, note that when importing an Excel file, the [listSeparator](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ListSeparator) property will be updated based on the culture of the launched import/export service. -In the example below, the Spreadsheet control is rendered with the `German culture` [`de`]. Additionally, you can find references on how to set the culture-based argument separator and culture-based formatted numeric value as arguments to the formulas. +In the example below, the Spreadsheet component is rendered with the **German culture[de]**. The example also shows how to set the culture-based argument separator and use culture-based formatted numeric values as arguments in formulas. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -42,11 +41,11 @@ In the example below, the Spreadsheet control is rendered with the `German cultu ## Create User Defined Functions / Custom Functions -The Spreadsheet includes a number of built-in formulas. For your convenience, a list of supported formulas can be found [here](https://ej2.syncfusion.com/aspnetcore/documentation/spreadsheet/formulas#supported-formulas). +The Spreadsheet includes a set of built-in formulas. For convenience, you can find the list of supported formulas [here](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/formulas#supported-formulas). -You can define and use an unsupported formula, i.e. a user defined/custom formula, in the spreadsheet by using the `addCustomFunction` function. Meanwhile, remember that you should define a user defined/custom formula whose results should only return a single value. If a user-defined/custom formula returns an array, it will be time-consuming to update adjacent cell values. +You can also define and use formulas that are not supported by default, known as **user defined/custom formulas**, by using the [addCustomFunction](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#addcustomfunction) function. Keep in mind that a user defined/custom formula should return only a single value. If the formula returns an array, updating adjacent cell values will take more time and may affect performance. -The following code example shows an unsupported formula in the spreadsheet. +The following code example shows how to use an unsupported formula in the Spreadsheet. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -57,7 +56,7 @@ The following code example shows an unsupported formula in the spreadsheet. {% endhighlight %} {% endtabs %} -Second, if you want to directly compute any formula or expression, you can use the `computeExpression` method. This method will work for both built-in and used-defined/custom formula. +To directly compute a formula or expression, use the [computeExpression](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#computeexpression) method. This method will work for both built-in and used-defined/custom formula. The following code example shows how to use `computeExpression` method in the spreadsheet. @@ -70,20 +69,21 @@ The following code example shows how to use `computeExpression` method in the sp {% endhighlight %} {% endtabs %} -## Formula bar +## Formula Bar -Formula bar is used to edit or enter cell data in much easier way. By default, the formula bar is enabled in the spreadsheet. Use the [`showFormulaBar`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ShowFormulaBar) property to enable or disable the formula bar. +The formula bar is used to enter or edit cell data more easily. By default, the formula bar is enabled in the spreadsheet. Use the [`showFormulaBar`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ShowFormulaBar) property to enable or disable the formula bar. ## Named Ranges -You can define a meaningful name for a cell range and use it in the formula for calculation. It makes your formula much easier to understand and maintain. You can add named ranges to the Spreadsheet in the following ways, +You can assign a meaningful name to a cell range and then use that name in formulas for calculation. This makes formulas easier to read, understand, and maintain. Named ranges can be added to the Spreadsheet in several ways: + +* Use the [`definedNames`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_DefinedNames) collection to add multiple named ranges during the initial load. +* Use the [`addDefinedName`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#adddefinedname) method to add a named range dynamically at runtime. +* Remove a named range dynamically using the [`removeDefinedName`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#removedefinedname) method. +* Select a range of cells and enter a name for the selected range directly in the **Name Box**. -* Using the [`definedNames`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_DefinedNames) collection, you can add multiple named ranges at initial load. -* Use the `addDefinedName` method to add a named range dynamically. -* You can remove an added named range dynamically using the `removeDefinedName` method. -* Select the range of cells, and then enter the name for the selected range in the name box. +The following code example demonstrates how named ranges can be defined and used in formulas within the Spreadsheet. -The following code example shows the usage of named ranges support. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -96,18 +96,20 @@ The following code example shows the usage of named ranges support. ## Calculation Mode -The Spreadsheet provides a `Calculation Mode` feature like the calculation options in online Excel. This feature allows you to control when and how formulas are recalculated in the spreadsheet. The available modes are: +The Spreadsheet provides a **Calculation Mode** feature similar to the calculation options in online Excel. This feature lets you control when and how formulas are recalculated in the spreadsheet. The available modes are: -* `Automatic`: Formulas are recalculated instantly whenever a change occurs in the dependent cells. -* `Manual`: Formulas are recalculated only when triggered explicitly by the user using options like `Calculate Sheet` or `Calculate Workbook`. +* **Automatic**: Formulas recalculate instantly whenever a change is made in dependent cells. +* **Manual**: Formulas recalculate only when explicitly triggered by the user using options like **Calculate Sheet** or **Calculate Workbook**. -You can configure the calculate mode using the [`calculationMode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CalculationMode) property of the Spreadsheet. These modes offer flexibility to balance real-time updates and performance optimization. +You can configure the calculation mode using the [`calculationMode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CalculationMode) property of the Spreadsheet. These modes give flexibility to balance real-time updates with performance optimization. ### Automatic Mode -In Automatic Mode, formulas are recalculated instantly whenever a dependent cell is modified. This mode is perfect for scenarios where real-time updates are essential, ensuring that users see the latest results without additional actions. +In **Automatic Mode**, formulas are recalculated immediately whenever a dependent cell is changed. This mode is ideal for situations where real-time updates are important, ensuring that users always see the latest results without needing extra steps. -For example, consider a spreadsheet where cell `C1` contains the formula `=A1+B1`. When the value in `A1` or `B1` changes, `C1` updates immediately without requiring any user intervention. You can enable this mode by setting the [`calculationMode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CalculationMode) property to `Automatic`. +For example, if cell `C1` contains the formula `=A1+B1`, any change in `A1` or `B1` will instantly update the value in `C1`. No manual action is required. + +You can enable this mode by setting the [`calculationMode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CalculationMode) property to `Automatic`. The following code example demonstrates how to set the Automatic calculation mode in a Spreadsheet. @@ -122,11 +124,12 @@ The following code example demonstrates how to set the Automatic calculation mod ### Manual Mode -In Manual Mode, formulas are not recalculated automatically when cell values are modified. Instead, recalculations must be triggered explicitly. This mode is ideal for scenarios where performance optimization is a priority, such as working with large datasets or computationally intensive formulas. +In **Manual Mode**, formulas are not recalculated automatically when cell values change. Instead, recalculation must be triggered explicitly. This mode is useful when performance optimization is important, such as working with large datasets or formulas that require heavy computation. -For example, imagine a spreadsheet where cell `C1` contains the formula `=A1+B1`. When the value in `A1` or `B1` changes, the value in `C1` will not update automatically. Instead, the recalculation must be initiated manually using either the `Calculate Sheet` or `Calculate Workbook` option. To manually initiate recalculation, the Spreadsheet provides two options: +For example, if cell `C1` contains the formula `=A1+B1`, changing the values in `A1` or `B1` will not update `C1` automatically. The recalculation must be initiated manually using either the `Calculate Sheet` or `Calculate Workbook` option. -* `Calculate Sheet`: Recalculates formulas for the active sheet only. +The Spreadsheet provides two manual recalculation options: +* `Calculate Sheet`: Recalculates formulas only in the active sheet. * `Calculate Workbook`: Recalculates formulas across all sheets in the workbook. The following code example demonstrates how to set the Manual calculation mode in a Spreadsheet. @@ -142,68 +145,25 @@ The following code example demonstrates how to set the Manual calculation mode i ## Supported Formulas -The following are the list of formulas supported in spreadsheet, +The Spreadsheet component supports a comprehensive set of built-in formulas organized by category. Each formula can be used for calculations, data analysis, text manipulation, date operations, and logical evaluations. + +### Math & Trigonometry | Formula | Description | -|-------|---------| +|---------|-------------| | ABS | Returns the value of a number without its sign. | -| ADDRESS | Returns a cell reference as text, given specified row and column numbers. | -| AND | Returns TRUE if all the arguments are TRUE, otherwise returns FALSE. | -| AVERAGE | Calculates average for the series of numbers and/or cells excluding text. | -| AVERAGEA | Calculates the average for the cells evaluating TRUE as 1, text and FALSE as 0. | -| AVERAGEIF | Clears content of the active cell and enables edit mode. | -| AVERAGEIFS | Calculates average for the cells based on specified conditions. | | CEILING | Rounds a number up to the nearest multiple of a given factor. | -| CHOOSE | Returns a value from list of values, based on index number. | -| CHAR | Returns the character from the specified number. | -| CODE | Returns the numeric code for the first character in a given string. | -| CONCAT | Concatenates a list or a range of text strings. | -| CONCATENATE | Combines two or more strings together. | -| COUNT | Counts the cells that contain numeric values in a range. | -| COUNTA | Counts the cells that contains values in a range. | -| COUNTBLANK | Returns the number of empty cells in a specified range of cells. | -| COUNTIF | Counts the cells based on specified condition. | -| COUNTIFS | Counts the cells based on specified conditions. | -| DATE | Returns the date based on given year, month, and day. | -| DATEVALUE | Converts a date string into date value. | -| DAY | Returns the day from the given date. | -| DAYS | Returns the number of days between two dates. | | DECIMAL | Converts a text representation of a number in a given base into a decimal number. | | DEGREES | Converts radians to degrees. | -| DOLLAR | Converts the number to currency formatted text. | -| EDATE | Returns a date with given number of months before or after the specified date. | -| EOMONTH | Returns the last day of the month that is a specified number of months before or after an initially supplied start date. | | EVEN | Rounds a positive number up and negative number down to the nearest even integer. | -| EXACT | Checks whether a two text strings are exactly same and returns TRUE or FALSE. | | EXP | Returns e raised to the power of the given number. | | FACT | Returns the factorial of a number. | -| FIND | Returns the position of a string within another string, which is case sensitive.| | FLOOR | Rounds a number down to the nearest multiple of a given factor. | -| HLOOKUP | Looks for a value in the top row of the array of values and then returns a value in the same column from a row in the array that you specify. | -| HOUR | Returns the number of hours in a specified time string. | -| IF | Returns value based on the given expression. | -| IFERROR | Returns value if no error found else it will return specified value. | -| IFS | Returns value based on the given multiple expressions. | -| INDEX | Returns a value of the cell in a given range based on row and column number. | | INT | Rounds a number down to the nearest integer. | -| INTERCEPT | Calculates the point of the Y-intercept line via linear regression. | -| ISNUMBER | Returns true when the value parses as a numeric value. | -| LARGE | Returns the `k-th` largest value in a given array. | -| LEN | Returns a number of characters in a given string. | | LN | Returns the natural logarithm of a number. | | LOG | Returns the logarithm of a number to the base that you specify. | -| LOOKUP | Looks for a value in a one-row or one-column range, then returns a value from the same position in a second one-row or one-column range. | -| MATCH | Returns the relative position of a specified value in given range. | -| MAX | Returns the largest number of the given arguments. | -| MEDIAN | Returns the median of the given set of numbers. | -| MINUTE | Returns the number of minutes in a specified time string. | -| MIN | Returns the smallest number of the given arguments. | | MOD | Returns a remainder after a number is divided by divisor. | -| MONTH | Returns the number of months in a specified date string. | -| NOT | Returns the inverse of a given logical expression. | -| NOW | Returns the current date and time. | | ODD | Rounds a positive number up and negative number down to the nearest odd integer. | -| OR | Returns TRUE if any of the arguments are TRUE, otherwise returns FALSE. | | PI | Returns the value of pi. | | POWER | Returns the result of a number raised to power. | | PRODUCT | Multiplies a series of numbers and/or cells. | @@ -213,24 +173,106 @@ The following are the list of formulas supported in spreadsheet, | ROUND | Rounds a number to the specified number of digits. | | ROUNDDOWN | Rounds a number down, toward zero. | | ROUNDUP | Rounds a number up, away from zero. | -| RSQ | Returns the square of the Pearson product moment correlation coefficient based on data points in known_y's and known_x's. | -| SECOND | Returns the number of seconds in a specified time string. | -| SMALL | Returns the `k-th` smallest value in a given array. | -| SLOPE | Returns the slope of the line from linear regression of the data points. | -| SORT | Sorts the contents of a column, range, or array in ascending or descending order. | | SQRT | Returns the square root of a positive number. | -| SUBTOTAL | Returns subtotal for a range using the given function number. | +| TRUNC | Truncates a supplied number to a specified number of decimal places. | + + +### Statistical & Aggregate + +| Formula | Description | +|---------|-------------| +| AVERAGE | Calculates average for the series of numbers and/or cells excluding text. | +| AVERAGEA | Calculates the average for the cells evaluating TRUE as 1, text and FALSE as 0. | +| AVERAGEIF | Calculates the average of cells that meet a specified condition. | +| AVERAGEIFS | Calculates average for cells based on multiple specified conditions. | +| COUNT | Counts the cells that contain numeric values in a range. | +| COUNTA | Counts the cells that contain values in a range. | +| COUNTBLANK | Returns the number of empty cells in a specified range of cells. | +| COUNTIF | Counts the cells based on a specified condition. | +| COUNTIFS | Counts the cells based on multiple specified conditions. | +| GEOMEAN | Returns the geometric mean of a given array or range of positive data. | +| INTERCEPT | Calculates the point of the Y-intercept line via linear regression. | +| LARGE | Returns the `k-th` largest value in a given array. | +| MAX | Returns the largest number of the given arguments. | +| MEDIAN | Returns the median of the given set of numbers. | +| MIN | Returns the smallest number of the given arguments. | +| RSQ | Returns the square of the Pearson product moment correlation coefficient based on data points. | +| SLOPE | Returns the slope of the line from linear regression of the data points. | +| SMALL | Returns the `k-th` smallest value in a given array. | | SUM | Adds a series of numbers and/or cells. | -| SUMIF | Adds the cells based on specified condition. | -| SUMIFS | Adds the cells based on specified conditions. | -| SUMPRODUCT | Returns the sum of the products of the corresponding array in given arrays. | -| T | Checks whether a value is text or not and returns the text. | -| TEXT | Converts the supplied value into text by using the user-specified format. | +| SUMIF | Adds the cells based on a specified condition. | +| SUMIFS | Adds the cells based on multiple specified conditions. | +| SUMPRODUCT | Returns the sum of the products of corresponding arrays in given arrays. | +| SUBTOTAL | Returns subtotal for a range using the given function number. | + + +### Date & Time + +| Formula | Description | +|---------|-------------| +| DATE | Returns the date based on given year, month, and day. | +| DATEVALUE | Converts a date string into date value. | +| DAY | Returns the day from the given date. | +| DAYS | Returns the number of days between two dates. | +| EDATE | Returns a date with given number of months before or after the specified date. | +| EOMONTH | Returns the last day of the month that is a specified number of months before or after a start date. | +| HOUR | Returns the number of hours in a specified time string. | +| MINUTE | Returns the number of minutes in a specified time string. | +| MONTH | Returns the number of months in a specified date string. | +| NOW | Returns the current date and time. | +| SECOND | Returns the number of seconds in a specified time string. | | TIME | Converts hours, minutes, seconds to the time formatted text. | | TODAY | Returns the current date. | -| TRUNC | Truncates a supplied number to a specified number of decimal places. | -| UNIQUE | Returns a unique values from a range or array. | -| VLOOKUP | Looks for a specific value in the first column of a lookup range and returns a corresponding value from a different column within the same row. | +| WEEKDAY | Returns the day of the week for a specified date. | + +### Logical + +| Formula | Description | +|---------|-------------| +| AND | Returns TRUE if all the arguments are TRUE, otherwise returns FALSE. | +| IF | Returns value based on the given expression. | +| IFERROR | Returns value if no error found; else returns specified value. | +| IFS | Returns value based on multiple given expressions. | +| NOT | Returns the inverse of a given logical expression. | +| OR | Returns TRUE if any of the arguments are TRUE, otherwise returns FALSE. | + + +### Lookup & Reference + +| Formula | Description | +|---------|-------------| +| ADDRESS | Returns a cell reference as text, given specified row and column numbers. | +| CHOOSE | Returns a value from list of values, based on index number. | +| HLOOKUP | Looks for a value in the top row of an array and returns a value in the same column from a specified row. | +| INDEX | Returns a value of the cell in a given range based on row and column number. | +| LOOKUP | Looks for a value in a one-row or one-column range, then returns a value from the same position in another range. | +| MATCH | Returns the relative position of a specified value in a given range. | +| SORT | Sorts the contents of a column, range, or array in ascending or descending order. | +| UNIQUE | Returns unique values from a range or array. | +| VLOOKUP | Looks for a value in the first column of a lookup range and returns a corresponding value from a different column. | + +### Text + +| Formula | Description | +|---------|-------------| +| CHAR | Returns the character from the specified number. | +| CODE | Returns the numeric code for the first character in a given string. | +| CONCAT | Concatenates a list or a range of text strings. | +| CONCATENATE | Combines two or more strings together. | +| DOLLAR | Converts the number to currency formatted text. | +| EXACT | Checks whether two text strings are exactly the same and returns TRUE or FALSE. | +| FIND | Returns the position of a string within another string (case sensitive). | +| LEN | Returns the number of characters in a given string. | +| PROPER | Converts text to proper case (first letter capitalized). | +| T | Checks whether a value is text or not and returns the text. | +| TEXT | Converts the supplied value into text by using the user-specified format. | + +### Information + +| Formula | Description | +|---------|-------------| +| ISNUMBER | Returns true when the value parses as a numeric value; otherwise returns false. | + ## Formula Error Dialog @@ -238,18 +280,22 @@ If you enter an invalid formula in a cell, an error dialog with an error message | Error Message | Reason | |-------|---------| -| We found that you typed a formula with an invalid arguments | Occurs when passing an argument even though it wasn't needed. | -| We found that you typed a formula with an empty expression | Occurs when passing an empty expression in the argument. | -| We found that you typed a formula with one or more missing opening or closing parenthesis | Occurs when an open parenthesis or a close parenthesis is missing. | -| We found that you typed a formula which is improper | Occurs when passing a single reference but a range was needed. | -| We found that you typed a formula with a wrong number of arguments | Occurs when the required arguments were not passed. | -| We found that you typed a formula which requires 3 arguments | Occurs when the required 3 arguments were not passed. | -| We found that you typed a formula with a mismatched quotes | Occurs when passing an argument with mismatched quotes. | -| We found that you typed a formula with a circular reference | Occurs when passing a formula with circular cell reference. | -| We found that you typed a formula which is invalid | Except in the cases mentioned above, all other errors will fall into this broad category. | +| `We found that you typed a formula with an invalid arguments` | Occurs when passing an argument even though it wasn't needed. | +| `We found that you typed a formula with an empty expression` | Occurs when passing an empty expression in the argument. | +| `We found that you typed a formula with one or more missing opening or closing parenthesis` | Occurs when an open parenthesis or a close parenthesis is missing. | +| `We found that you typed a formula which is improper` | Occurs when passing a single reference but a range was needed. | +| `We found that you typed a formula with a wrong number of arguments` | Occurs when the required arguments were not passed. | +| `We found that you typed a formula which requires 3 arguments` | Occurs when the required 3 arguments were not passed. | +| `We found that you typed a formula with a mismatched quotes` | Occurs when passing an argument with mismatched quotes. | +| `We found that you typed a formula with a circular reference` | Occurs when passing a formula with circular cell reference. | +| `We found that you typed a formula which is invalid` | Except in the cases mentioned above, all other errors will fall into this broad category. | ![Formula Alert Dialog](./images/formula-alert-dialog.png) +## Note + +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. + ## See Also * [Editing](./editing) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/freeze-pane.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/freeze-pane.md index 3d753cc451..83c050347a 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/freeze-pane.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/freeze-pane.md @@ -7,10 +7,15 @@ control: Freeze Pane documentation: ug --- +# Freeze pane in React Spreadsheet component -# FreezePanes in ASP.NET Core Spreadsheet control +**Freeze Panes** helps you keep specific rows or columns visible while scrolling through the sheet content. This makes it easier to work with large spreadsheets without losing track of important headers or labels. -Freeze Panes helps you to keep particular rows or columns visible when scrolling the sheet content in the spreadsheet. You can specify the number of frozen rows and columns using the `frozenRows` and `frozenColumns` properties inside the [`Sheet`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_Sheets) property. +You can set the number of frozen rows and columns using the [`frozenRows`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Sheet.html#Syncfusion_EJ2_Spreadsheet_Sheet_FrozenRows) and [`frozenColumns`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Sheet.html#Syncfusion_EJ2_Spreadsheet_Sheet_FrozenColumns) properties inside the [`Sheet`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Sheet.html) property. + +To quickly get started with Freeze Panes in React Spreadsheet, you can check out this video tutorial: + +{% youtube "https://www.youtube.com/watch?v=TX4P6gFymwo" %} ## Apply freeze panes on UI @@ -19,7 +24,7 @@ Freeze Panes helps you to keep particular rows or columns visible when scrolling In the active spreadsheet, click the cell where you want to create freeze panes. Freeze panes can be done in any of the following ways: * Select the View tab in the Ribbon toolbar and choose the `Freeze Panes` item. -* Use the `freezePanes` method programmatically. +* Use the [`freezePanes`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#freezepanes) method programmatically. ## FrozenRows @@ -38,12 +43,13 @@ It allows you to keep a certain number of columns visible while scrolling horizo **User Interface**: -In the active spreadsheet, select the cell where you want to create frozen columns. Frozen columns can be done in any one of the following ways: +In the active spreadsheet, you can freeze columns by selecting the cell where you want them to remain visible. Frozen columns can be applied in the following ways: -* Select the View tab in the Ribbon toolbar and choose the `Freeze Columns` item. -* You can specify the number of frozen columns using the `frozenColumns` property inside the `Sheet` property. +* Go to the **View** tab in the Ribbon toolbar and choose the **Freeze Columns** option. +* Set the number of frozen columns using the [`frozenColumns`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Sheet.html#Syncfusion_EJ2_Spreadsheet_Sheet_FrozenColumns) property inside the [Sheet](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Sheet.html) property. + +In this demo, `frozenColumns` is set to **2** and `frozenRows` is set to **2**. As a result, the first two columns on the left and the top two rows remain frozen while scrolling. -In this demo, the frozenColumns is set as ‘2’, and the frozenRows is set as ‘2’. Hence, the two columns on the left and the top two rows are frozen. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -54,15 +60,17 @@ In this demo, the frozenColumns is set as ‘2’, and the frozenRows is set as {% endhighlight %} {% endtabs %} - - ## Limitations -Freeze Panes feature is not compatible with all the features which are available in the spreadsheet. Below features are not compatible with Freeze Panes feature. +Here, we have listed out the limitations with Freeze Panes feature. -* Merging the cells between freeze and unfreeze area. +* Merging cells between the freeze and unfreeze areas is not supported. * If images and charts are added inside the freeze area cells, their portion in the unfreeze area will not move when scrolling. +## Note + +You can refer to our [React Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [React Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. + ## See Also * [Sorting](./sort) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/global-local.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/global-local.md index 96e2d1f3c0..6389a265cb 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/global-local.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/global-local.md @@ -11,372 +11,373 @@ documentation: ug ## Localization -The [Localization](https://ej2.syncfusion.com/aspnetcore/documentation/common/localization) library allows you to localize the default text content of the Spreadsheet. The Spreadsheet has static text on some features (cell formatting, Merge, Data validation, etc.) that can be changed to other cultures (Arabic, Deutsch, French, etc.) by defining the [locale](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_Locale) value and translation object. +The [`Localization`](https://ej2.syncfusion.com/aspnetcore/documentation/common/localization) library allows you to localize the default text content of the Spreadsheet. The Spreadsheet has static text on some features (cell formatting, Merge, Data validation, etc.) that can be changed to other cultures (Arabic, Deutsch, French, etc.) by defining the +[`locale`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_Locale) value and translation object. The following list of properties and their values are used in the Spreadsheet. -|Locale keywords|Text| -|---------------|----| -Cut | Cut -Copy | Copy -Paste | Paste -PasteSpecial | Paste Special -All | All -Values | Values -Formats | Formats -Font | Font -FontSize | Font Size -Bold | Bold -Italic | Italic -Underline | Underline -Strikethrough | Strikethrough -TextColor | Text Color -FillColor | Fill Color -HorizontalAlignment | Horizontal Alignment -AlignLeft | Align Left -AlignCenter | Center -AlignRight | Align Right -VerticalAlignment | Vertical Alignment -AlignTop | Align Top -AlignMiddle | Align Middle -AlignBottom | Align Bottom -InsertFunction | Insert Function -Insert | Insert -Delete | Delete -Rename | Rename -Hide | Hide -Unhide | Unhide -NameBox | Name Box -ShowHeaders | Show Headers -HideHeaders | Hide Headers -ShowGridLines | Show Gridlines -HideGridLines | Hide Gridlines -AddSheet | Add Sheet -ListAllSheets | List All Sheets -FullScreen | Full Screen -CollapseToolbar | Collapse Toolbar -ExpandToolbar | Expand Toolbar -CollapseFormulaBar | Collapse Formula Bar -ExpandFormulaBar | Expand Formula Bar -File | File -Home | Home -Formulas | Formulas -View | View -New | New -Open | Open -SaveAs | Save As -ExcelXlsx | Microsoft Excel -ExcelXls | Microsoft Excel 97-2003 -CSV | Comma-separated values -FormulaBar | Formula Bar -Ok | Ok -Close | Close -Cancel | Cancel -Apply | Apply -MoreColors | More Colors -StandardColors | Standard Colors -General | General -Number | Number -Currency | Currency -Accounting | Accounting -ShortDate | Short Date -LongDate | Long Date -Time | Time -Percentage | Percentage -Fraction | Fraction -Scientific | Scientific -Text | Text -NumberFormat | Number Format -MobileFormulaBarPlaceHolder | Enter value or Formula -PasteAlert | You can't paste it here because the copy area and paste area aren't in the same size. Try pasting in a different range. -DestroyAlert | Are you sure you want to destroy the current workbook without saving and create a new workbook? -SheetRenameInvalidAlert | Sheet name contains invalid character. -SheetRenameEmptyAlert | Sheet name cannot be empty. -SheetRenameAlreadyExistsAlert | Sheet name already exists. Enter another name. -DeleteSheetAlert | Are you sure you want to delete this sheet? -DeleteSingleLastSheetAlert | A Workbook must contain at least one visible worksheet. -PickACategory | Pick a category -Description | Description -UnsupportedFile | Unsupported File -InvalidUrl | Invalid Url -SUM | Adds a series of numbers and/or cells. -SUMIF | Adds the cells based on the specified condition. -SUMIFS | Adds the cells based on the specified conditions. -ABS | Returns the value of a number without its sign. -RAND | Returns a random number between 0 and 1. -RANDBETWEEN | Returns a random integer based on the specified values. -FLOOR | Rounds a number down to the nearest multiple of a given factor. -CEILING | Rounds a number up to the nearest multiple of a given factor. -PRODUCT | Multiplies a series of numbers and/or cells. -AVERAGE | Calculates average for the series of numbers and/or cells excluding text. -AVERAGEIF | Calculates average for the cells based on the specified criterion. -AVERAGEIFS | Calculates average for the cells based on the specified conditions. -AVERAGEA | Calculates the average for the cells evaluating TRUE as 1 text and FALSE as 0. -COUNT | Counts the cells that contain numeric values in a range. -COUNTIF | Counts the cells based on the specified condition. -COUNTIFS | Counts the cells based on specified conditions. -COUNTA | Counts the cells that contain values in a range. -MIN | Returns the smallest number of the given arguments. -MAX | Returns the largest number of the given arguments. -DATE | Returns the date based on the given year, month, and day. -DAY | Returns the day from the given date. -DAYS | Returns the number of days between two dates. -IF | Returns value based on the given expression. -IFS | Returns value based on the given multiple expressions. -AND | Returns TRUE if all the arguments are TRUE otherwise returns FALSE. -OR | Returns TRUE if any of the arguments are TRUE otherwise returns FALSE. -IFERROR | Returns value if no error found else it will return specified value. -CHOOSE | Returns a value from the list of values based on the index number. -INDEX | Returns the value of the cell in a given range based on row and column number. -FIND | Returns the position of a string within another string which is case sensitive. -CONCATENATE | Combines two or more strings together. -CONCAT | Concatenates a list or a range of text strings. -SUBTOTAL | Returns subtotal for a range using the given function number. -RADIANS | Converts degrees into radians. -MATCH | Returns the relative position of a specified value in the given range. -DefineNameExists | This name already exists try a different name. -CircularReference | When a formula refers to one or more circular references this may result in an incorrect calculation. -ShowRowsWhere | Show rows where | -CustomFilterDatePlaceHolder | Choose a date -CustomFilterPlaceHolder | Enter the value -CustomFilter | Custom Filter -Between | Between -MatchCase | Match Case -DateTimeFilter | DateTime Filters -Undo | Undo -Redo | Redo -DateFilter | Date Filters -TextFilter | Text Filters -NumberFilter | Number Filters -ClearFilter | Clear Filter -NoResult | No Matches Found -FilterFalse | False -FilterTrue | True -Blanks | Blanks -SelectAll | Select All -GreaterThanOrEqual | Greater Than Or Equal -GreaterThan | Greater Than -LessThanOrEqual | Less Than Or Equal -LessThan | Less Than -NotEqual | Not Equal -Equal | Equal -Contains | Contains -EndsWith | Ends With -StartsWith | Starts With -ClearButton | Clear -FilterButton | Filter -CancelButton | Cancel -OKButton | OK -Search | Search -Link | Link -Hyperlink | Hyperlink -EditHyperlink | Edit Hyperlink -OpenHyperlink | Open Hyperlink -RemoveHyperlink | Remove Hyperlink -InsertLink | Insert Link -EditLink | Edit Link -WebPage | WEB PAGE -ThisDocument | THIS DOCUMENT -DisplayText | Display Text -Url | URL -CellReference | Cell Reference -Sheet | Sheet -DefinedNames | Defined Names -EnterTheTextToDisplay | Enter the text to display -EnterTheUrl | Enter the URL -ProtectSheet | Protect Sheet -UnprotectSheet | Unprotect Sheet -SelectCells | Select cells -FormatCells | Format cells -FormatRows | Format rows -Format Columns | Format columns -InsertLinks | Insert links -ProtectContent | Protect the contents of locked cells -ProtectAllowUser | Allow all users of this worksheet to | -EditAlert | The cell you're trying to change is protected. To make a change, unprotect the sheet. -FindReplaceTooltip | Find & Replace -InsertingEmptyValue | Reference value is not valid. -ByRow | By Row -ByColumn | By Column -MatchExactCellElements | Match Exact Cell Contents -EntercellAddress | Enter Cell Address -FindAndReplace | Find and Replace -ReplaceAllEnd | matches replaced with. -FindNextBtn | Find Next -FindPreviousBtn | Find Previous -ReplaceBtn | Replace -ReplaceAllBtn | Replace All -GotoHeader | Go To -GotoSpecialHeader | Go To Special -SearchWithin | Search within -SearchBy | Search by -Reference | Reference -Workbook | Workbook -NoElements | We couldn’t find what you were looking for. -FindWhat | Find what -ReplaceWith | Replace with -EnterValue | Enter Value -DefineNameInValid | The name that you entered is not valid. -FindValue | Find Value -ReplaceValue | Replace Value -DataValidation | Data Validation -CLEARALL | CLEAR ALL -APPLY | APPLY -CellRange | Cell Range -Allow | Allow -Data | Data -Minimum | Minimum -Maximum | Maximum -IgnoreBlank | Ignore blank -WholeNumber | Whole Number -Decimal | Decimal -Date | Date -TextLength | Text Length -List | List -NotBetween | Not between -EqualTo | Equal to -NotEqualTo | Not equal to -Greaterthan | Greater than -Lessthan | Less than -GreaterThanOrEqaulTo | Greater than or eqaul to -LessThanOrEqualTo | Less than or equal to -InCellDropDown | In-cell-dropdown -Sources | Sources -Value | Value -Retry | Retry -DialogError | The list source must be a reference to a single row or column. -ValidationError | This value doesn't match the data validation restrictions defined for the cell. -HideRow | Hide Row -HideRows | Hide Rows -UnHideRows | UnHide Rows -HideColumn | Hide Column -HideColumns | Hide Columns -UnHideColumns | UnHide Columns -InsertRow | Insert Row -InsertRows | Insert Rows -InsertColumn | Insert Column -InsertColumns | Insert Columns -DeleteRow | Delete Row -DeleteRows | Delete Rows -DeleteColumn | Delete Column -DeleteColumns | Delete Columns -Borders | Borders -TopBorders | Top Borders -LeftBorders | Left Borders -RightBorders | Right Borders -BottomBorders | Bottom Borders -AllBorders | All Borders -HorizontalBorders | Horizontal Borders -VerticalBorders | Vertical Borders -OutsideBorders | Outside Borders -InsideBorders | Inside Borders -NoBorders | No Borders -BorderColor | Border Color -BorderStyle | Border Style -INTERCEPT | Calculates the point of the Y-intercept line via linear regression. -SLOPE | Returns the slope of the line from linear regression of the data points. -FreezePanes | Freeze Panes -FreezeRows | Freeze Rows -FreezeColumns | Freeze Columns -UnfreezePanes | Unfreeze Panes -UnfreezeRows | Unfreeze Rows -UnfreezeColumns | Unfreeze Columns -MergeCells | Merge Cells -MergeAll | Merge All -MergeHorizontally | Merge Horizontally -MergeVertically | Merge Vertically -Unmerge | Unmerge -UnmergeCells | Unmerge Cells -SortAscending | Ascending -SortDescending | Descending -CustomSort | Custom Sort -ClearAllFilter | Clear -ReapplyFilter | Reapply -Clear | Clear -ClearContents | Clear Contents -ClearAll | Clear All -ClearFormats | Clear Formats -ClearHyperlinks | Clear Hyperlinks -Image | Image -AddColumn | Add Column -SortBy | Sort by -ThenBy | Then by -Chart | Chart -Column | Column -Bar | Bar -Area | Area -Pie | Pie -Doughnut | Doughnut -PieAndDoughnut | Pie/Doughnut -Line | Line -Radar | Radar -Scatter | Scatter -ChartDesign | Chart Design -ClusteredColumn | Clustered Column -StackedColumn | Stacked Column -StackedColumn100 | 100% Stacked Column -ClusteredBar | Clustered Bar -StackedBar | Stacked Bar -StackedBar100 | 100% Stacked Bar -StackedArea | Stacked Area -StackedArea100 | 100% Stacked Area -StackedLine | Stacked Line -StackedLine100 | 100% Stacked Line -AddChartElement | Add Chart Element -Axes | Axes -AxisTitle | Axis Title -ChartTitle | Chart Title -DataLabels | Data Labels -Gridlines | Gridlines -Legends | Legends -PrimaryHorizontal | Primary Horizontal -PrimaryVertical | Primary Vertical -None | None -AboveChart | Above Chart -Center | Center -InsideEnd | Inside End -InsideBase | Inside Base -OutsideEnd | OutSide End -PrimaryMajorHorizontal | Primary Major Horizontal -PrimaryMajorVertical | Primary Major Vertical -PrimaryMinorHorizontal | Primary Minor Horizontal -PrimaryMinorVertical | Primary Minor Vertical -Right | Right -Left | Left -Bottom | Bottom -Top | Top -SwitchRowColumn | Switch Row/Column -ChartTheme | Chart Theme -ChartType | Chart Type -Material | Material -Fabric | Fabric -Bootstrap | Bootstrap -HighContrastLight | HighContrastLight -MaterialDark | MaterialDark -FabricDark | FabricDark -HighContrast | HighContrast -BootstrapDark | BootstrapDark -Bootstrap4 | Bootstrap4 -VerticalAxisTitle | Vertical Axis Title -HorizontalAxisTitle | Horizontal Axis Title -EnterTitle | Enter Title -ProtectWorkbook | Protect Workbook -Password | Password (optional) | -unProtectPassword | Password -EnterThePassword | Enter the password -ConfirmPassword | Confirm Password -EnterTheConfirmPassword | Re-enter your password -PasswordAlert | Confirmation password is not identical -UnProtectWorkbook | Unprotect Workbook -UnProtectPasswordAlert | The password you supplied is not correct. -InCorrectPassword | Unable to open the file or worksheet with the given password. -PasswordAlertMsg | Enter the password -ConfirmPasswordAlertMsg | Enter the confirm password -IsProtected | is protected +Locale keywords |Text +-----|----- +`Cut` | Cut +`Copy` | Copy +`Paste` | Paste +`PasteSpecial` | Paste Special +`All` | All +`Values` | Values +`Formats` | Formats +`Font` | Font +`FontSize` | Font Size +`Bold` | Bold +`Italic` | Italic +`Underline` | Underline +`Strikethrough` | Strikethrough +`TextColor` | Text Color +`FillColor` | Fill Color +`HorizontalAlignment` | Horizontal Alignment +`AlignLeft` | Align Left +`AlignCenter` | Center +`AlignRight` | Align Right +`VerticalAlignment` | Vertical Alignment +`AlignTop` | Align Top +`AlignMiddle` | Align Middle +`AlignBottom` | Align Bottom +`InsertFunction` | Insert Function +`Insert` | Insert +`Delete` | Delete +`Rename` | Rename +`Hide` | Hide +`Unhide` | Unhide +`NameBox` | Name Box +`ShowHeaders` | Show Headers +`HideHeaders` | Hide Headers +`ShowGridLines` | Show Gridlines +`HideGridLines` | Hide Gridlines +`AddSheet` | Add Sheet +`ListAllSheets` | List All Sheets +`FullScreen` | Full Screen +`CollapseToolbar` | Collapse Toolbar +`ExpandToolbar` | Expand Toolbar +`CollapseFormulaBar` | Collapse Formula Bar +`ExpandFormulaBar` | Expand Formula Bar +`File` | File +`Home` | Home +`Formulas` | Formulas +`View` | View +`New` | New +`Open` | Open +`SaveAs` | Save As +`ExcelXlsx` | Microsoft Excel +`ExcelXls` | Microsoft Excel 97-2003 +`CSV` | Comma-separated values +`FormulaBar` | Formula Bar +`Ok` | Ok +`Close` | Close +`Cancel` | Cancel +`Apply` | Apply +`MoreColors` | More Colors +`StandardColors` | Standard Colors +`General` | General +`Number` | Number +`Currency` | Currency +`Accounting` | Accounting +`ShortDate` | Short Date +`LongDate` | Long Date +`Time` | Time +`Percentage` | Percentage +`Fraction` | Fraction +`Scientific` | Scientific +`Text` | Text +`NumberFormat` | Number Format +`MobileFormulaBarPlaceHolder` | Enter value or Formula +`PasteAlert` | You can't paste it here because the copy area and paste area aren't in the same size. Please try pasting in a different range. +`DestroyAlert` | Are you sure you want to destroy the current workbook without saving and create a new workbook? +`SheetRenameInvalidAlert` | Sheet name contains invalid character. +`SheetRenameEmptyAlert` | Sheet name cannot be empty. +`SheetRenameAlreadyExistsAlert` | Sheet name already exists. Please enter another name. +`DeleteSheetAlert` | Are you sure you want to delete this sheet? +`DeleteSingleLastSheetAlert` | A Workbook must contain at least one visible worksheet. +`PickACategory` | Pick a category +`Description` | Description +`UnsupportedFile` | Unsupported File +`InvalidUrl` | Invalid Url +`SUM` | Adds a series of numbers and/or cells. +`SUMIF` | Adds the cells based on the specified condition. +`SUMIFS` | Adds the cells based on the specified conditions. +`ABS` | Returns the value of a number without its sign. +`RAND` | Returns a random number between 0 and 1. +`RANDBETWEEN` | Returns a random integer based on the specified values. +`FLOOR` | Rounds a number down to the nearest multiple of a given factor. +`CEILING` | Rounds a number up to the nearest multiple of a given factor. +`PRODUCT` | Multiplies a series of numbers and/or cells. +`AVERAGE` | Calculates average for the series of numbers and/or cells excluding text. +`AVERAGEIF` | Calculates average for the cells based on the specified criterion. +`AVERAGEIFS` | Calculates average for the cells based on the specified conditions. +`AVERAGEA` | Calculates the average for the cells evaluating TRUE as 1 text and FALSE as 0. +`COUNT` | Counts the cells that contain numeric values in a range. +`COUNTIF` | Counts the cells based on the specified condition. +`COUNTIFS` | Counts the cells based on specified conditions. +`COUNTA` | Counts the cells that contain values in a range. +`MIN` | Returns the smallest number of the given arguments. +`MAX` | Returns the largest number of the given arguments. +`DATE` | Returns the date based on the given year, month, and day. +`DAY` | Returns the day from the given date. +`DAYS` | Returns the number of days between two dates. +`IF` | Returns value based on the given expression. +`IFS` | Returns value based on the given multiple expressions. +`AND` | Returns TRUE if all the arguments are TRUE otherwise returns FALSE. +`OR` | Returns TRUE if any of the arguments are TRUE otherwise returns FALSE. +`IFERROR` | Returns value if no error found else it will return specified value. +`CHOOSE` | Returns a value from the list of values based on the index number. +`INDEX` | Returns the value of the cell in a given range based on row and column number. +`FIND` | Returns the position of a string within another string which is case sensitive. +`CONCATENATE` | Combines two or more strings together. +`CONCAT` | Concatenates a list or a range of text strings. +`SUBTOTAL` | Returns subtotal for a range using the given function number. +`RADIANS` | Converts degrees into radians. +`MATCH` | Returns the relative position of a specified value in the given range. +`DefineNameExists` | This name already exists try a different name. +`CircularReference` | When a formula refers to one or more circular references this may result in an incorrect calculation. +`ShowRowsWhere` | Show rows where | +`CustomFilterDatePlaceHolder` | Choose a date +`CustomFilterPlaceHolder` | Enter the value +`CustomFilter` | Custom Filter +`Between` | Between +`MatchCase` | Match Case +`DateTimeFilter` | DateTime Filters +`Undo` | Undo +`Redo` | Redo +`DateFilter` | Date Filters +`TextFilter` | Text Filters +`NumberFilter` | Number Filters +`ClearFilter` | Clear Filter +`NoResult` | No Matches Found +`FilterFalse` | False +`FilterTrue` | True +`Blanks` | Blanks +`SelectAll` | Select All +`GreaterThanOrEqual` | Greater Than Or Equal +`GreaterThan` | Greater Than +`LessThanOrEqual` | Less Than Or Equal +`LessThan` | Less Than +`NotEqual` | Not Equal +`Equal` | Equal +`Contains` | Contains +`EndsWith` | Ends With +`StartsWith` | Starts With +`ClearButton` | Clear +`FilterButton` | Filter +`CancelButton` | Cancel +`OKButton` | OK +`Search` | Search +`Link` | Link +`Hyperlink` | Hyperlink +`EditHyperlink` | Edit Hyperlink +`OpenHyperlink` | Open Hyperlink +`RemoveHyperlink` | Remove Hyperlink +`InsertLink` | Insert Link +`EditLink` | Edit Link +`WebPage` | WEB PAGE +`ThisDocument` | THIS DOCUMENT +`DisplayText` | Display Text +`Url` | URL +`CellReference` | Cell Reference +`Sheet` | Sheet +`DefinedNames` | Defined Names +`EnterTheTextToDisplay` | Enter the text to display +`EnterTheUrl` | Enter the URL +`ProtectSheet` | Protect Sheet +`UnprotectSheet` | Unprotect Sheet +`SelectCells` | Select cells +`FormatCells` | Format cells +`FormatRows` | Format rows +`Format` Columns | Format columns +`InsertLinks` | Insert links +`ProtectContent` | Protect the contents of locked cells +`ProtectAllowUser` | Allow all users of this worksheet to | +`EditAlert` | The cell you're trying to change is protected. To make a change, unprotect the sheet. +`FindReplaceTooltip` | Find & Replace +`InsertingEmptyValue` | Reference value is not valid. +`ByRow` | By Row +`ByColumn` | By Column +`MatchExactCellElements` | Match Exact Cell Contents +`EntercellAddress` | Enter Cell Address +`FindAndReplace` | Find and Replace +`ReplaceAllEnd` | matches replaced with. +`FindNextBtn` | Find Next +`FindPreviousBtn` | Find Previous +`ReplaceBtn` | Replace +`ReplaceAllBtn` | Replace All +`GotoHeader` | Go To +`GotoSpecialHeader` | Go To Special +`SearchWithin` | Search within +`SearchBy` | Search by +`Reference` | Reference +`Workbook` | Workbook +`NoElements` | We couldn’t find what you were looking for. +`FindWhat` | Find what +`ReplaceWith` | Replace with +`EnterValue` | Enter Value +`DefineNameInValid` | The name that you entered is not valid. +`FindValue` | Find Value +`ReplaceValue` | Replace Value +`DataValidation` | Data Validation +`CLEARALL` | CLEAR ALL +`APPLY` | APPLY +`CellRange` | Cell Range +`Allow` | Allow +`Data` | Data +`Minimum` | Minimum +`Maximum` | Maximum +`IgnoreBlank` | Ignore blank +`WholeNumber` | Whole Number +`Decimal` | Decimal +`Date` | Date +`TextLength` | Text Length +`List` | List +`NotBetween` | Not between +`EqualTo` | Equal to +`NotEqualTo` | Not equal to +`Greaterthan` | Greater than +`Lessthan` | Less than +`GreaterThanOrEqaulTo` | Greater than or eqaul to +`LessThanOrEqualTo` | Less than or equal to +`InCellDropDown` | In-cell-dropdown +`Sources` | Sources +`Value` | Value +`Retry` | Retry +`DialogError` | The list source must be a reference to a single row or column. +`ValidationError` | This value doesn't match the data validation restrictions defined for the cell. +`HideRow` | Hide Row +`HideRows` | Hide Rows +`UnHideRows` | UnHide Rows +`HideColumn` | Hide Column +`HideColumns` | Hide Columns +`UnHideColumns` | UnHide Columns +`InsertRow` | Insert Row +`InsertRows` | Insert Rows +`InsertColumn` | Insert Column +`InsertColumns` | Insert Columns +`DeleteRow` | Delete Row +`DeleteRows` | Delete Rows +`DeleteColumn` | Delete Column +`DeleteColumns` | Delete Columns +`Borders` | Borders +`TopBorders` | Top Borders +`LeftBorders` | Left Borders +`RightBorders` | Right Borders +`BottomBorders` | Bottom Borders +`AllBorders` | All Borders +`HorizontalBorders` | Horizontal Borders +`VerticalBorders` | Vertical Borders +`OutsideBorders` | Outside Borders +`InsideBorders` | Inside Borders +`NoBorders` | No Borders +`BorderColor` | Border Color +`BorderStyle` | Border Style +`INTERCEPT` | Calculates the point of the Y-intercept line via linear regression. +`SLOPE` | Returns the slope of the line from linear regression of the data points. +`FreezePanes` | Freeze Panes +`FreezeRows` | Freeze Rows +`FreezeColumns` | Freeze Columns +`UnfreezePanes` | Unfreeze Panes +`UnfreezeRows` | Unfreeze Rows +`UnfreezeColumns` | Unfreeze Columns +`MergeCells` | Merge Cells +`MergeAll` | Merge All +`MergeHorizontally` | Merge Horizontally +`MergeVertically` | Merge Vertically +`Unmerge` | Unmerge +`UnmergeCells` | Unmerge Cells +`SortAscending` | Ascending +`SortDescending` | Descending +`CustomSort` | Custom Sort +`ClearAllFilter` | Clear +`ReapplyFilter` | Reapply +`Clear` | Clear +`ClearContents` | Clear Contents +`ClearAll` | Clear All +`ClearFormats` | Clear Formats +`ClearHyperlinks` | Clear Hyperlinks +`Image` | Image +`AddColumn` | Add Column +`SortBy` | Sort by +`ThenBy` | Then by +`Chart` | Chart +`Column` | Column +`Bar` | Bar +`Area` | Area +`Pie` | Pie +`Doughnut` | Doughnut +`PieAndDoughnut` | Pie/Doughnut +`Line` | Line +`Radar` | Radar +`Scatter` | Scatter +`ChartDesign` | Chart Design +`ClusteredColumn` | Clustered Column +`StackedColumn` | Stacked Column +`StackedColumn100` | 100% Stacked Column +`ClusteredBar` | Clustered Bar +`StackedBar` | Stacked Bar +`StackedBar100` | 100% Stacked Bar +`StackedArea` | Stacked Area +`StackedArea100` | 100% Stacked Area +`StackedLine` | Stacked Line +`StackedLine100` | 100% Stacked Line +`AddChartElement` | Add Chart Element +`Axes` | Axes +`AxisTitle` | Axis Title +`ChartTitle` | Chart Title +`DataLabels` | Data Labels +`Gridlines` | Gridlines +`Legends` | Legends +`PrimaryHorizontal` | Primary Horizontal +`PrimaryVertical` | Primary Vertical +`None` | None +`AboveChart` | Above Chart +`Center` | Center +`InsideEnd` | Inside End +`InsideBase` | Inside Base +`OutsideEnd` | OutSide End +`PrimaryMajorHorizontal` | Primary Major Horizontal +`PrimaryMajorVertical` | Primary Major Vertical +`PrimaryMinorHorizontal` | Primary Minor Horizontal +`PrimaryMinorVertical` | Primary Minor Vertical +`Right` | Right +`Left` | Left +`Bottom` | Bottom +`Top` | Top +`SwitchRowColumn` | Switch Row/Column +`ChartTheme` | Chart Theme +`ChartType` | Chart Type +`Material` | Material +`Fabric` | Fabric +`Bootstrap` | Bootstrap +`HighContrastLight` | HighContrastLight +`MaterialDark` | MaterialDark +`FabricDark` | FabricDark +`HighContrast` | HighContrast +`BootstrapDark` | BootstrapDark +`Bootstrap4` | Bootstrap4 +`VerticalAxisTitle` | Vertical Axis Title +`HorizontalAxisTitle` | Horizontal Axis Title +`EnterTitle` | Enter Title +`ProtectWorkbook` | Protect Workbook +`Password` | Password (optional) | +`unProtectPassword` | Password +`EnterThePassword` | Enter the password +`ConfirmPassword` | Confirm Password +`EnterTheConfirmPassword` | Re-enter your password +`PasswordAlert` | Confirmation password is not identical +`UnProtectWorkbook` | Unprotect Workbook +`UnProtectPasswordAlert` | The password you supplied is not correct. +`InCorrectPassword` | Unable to open the file or worksheet with the given password. +`PasswordAlertMsg` | Please enter the password +`ConfirmPasswordAlertMsg` | Please enter the confirm password +`IsProtected` | is protected ### Loading translations -To load translation object in an application, use `load` function of the `L10n` class. +To load translation object in an application, use [`load`](https://ej2.syncfusion.com/aspnetcore/documentation/common/internationalization#loading-culture-data) function of the [`L10n`](https://ej2.syncfusion.com/aspnetcore/documentation/common/internationalization) class. The following example demonstrates the Spreadsheet in `French` culture. In the below sample we have translated the ribbon tab names and Home tab content (clipboard, cell style). @@ -389,24 +390,106 @@ The following example demonstrates the Spreadsheet in `French` culture. In the b {% endhighlight %} {% endtabs %} - - ## Internationalization The Internationalization library is used to globalize number, date, and time values in the spreadsheet component. The following example demonstrates the Spreadsheet in French [ `fr-CH`] culture. In the below sample we have globalized the Date(Date column), Time(Time column), and Currency(Amount column) formats. -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/spreadsheet/asp-net-core/internationalization/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="InternationalizationController.cs" %} -{% include code-snippet/spreadsheet/asp-net-core/internationalization/internationalizationController.cs %} -{% endhighlight %} -{% endtabs %} +```ts +import * as React from 'react'; +import { createRoot } from 'react-dom/client'; +import { L10n, loadCldr, setCulture, setCurrencyCode } from '@syncfusion/ej2-base'; +import { SpreadsheetComponent, SheetsDirective, SheetDirective, RangesDirective, RangeDirective, ColumnsDirective, ColumnDirective } from '@syncfusion/ej2-react-spreadsheet'; +import * as cagregorian from './ca-gregorian.json'; +import * as currencies from './currencies.json'; +import * as numberingSystems from './numberingSystems.json'; +import * as numbers from './numbers.json'; +import * as timeZoneNames from './timeZoneNames.json'; +import { data } from './datasource'; +loadCldr(currencies, cagregorian, numbers, timeZoneNames, numberingSystems); +setCulture('fr-CH'); +setCurrencyCode('EUR'); +L10n.load({ + 'fr-CH': { + 'spreadsheet': { + 'File': 'Fichier', + 'Home': 'Accueil', + 'Insert': 'Insérer', + 'Formulas': 'Formules', + 'Data': 'Les données', + 'View': 'Vue', + 'Cut': 'Coupe', + 'Copy': 'Copie', + 'Paste': 'Pâte', + 'PasteSpecial': 'Pâte spéciale', + 'All': 'Tous les', + 'Values': 'Valeurs', + 'Formats': 'Les formats', + 'Font': 'fonte', + 'FontSize': 'Taille de police', + 'Bold': 'Audacieux', + 'Italic': 'Italique', + 'Underline': 'Souligner', + 'Strikethrough': 'Barré', + 'TextColor': 'Couleur du texte', + 'FillColor': 'La couleur de remplissage', + 'HorizontalAlignment': 'Alignement horizontal', + 'AlignLeft': 'Alignez à gauche', + 'AlignCenter': 'centre', + 'AlignRight': 'Aligner à droite', + 'VerticalAlignment': 'Alignement vertical', + 'AlignTop': 'Aligner en haut', + 'AlignMiddle': 'Aligner le milieu', + 'AlignBottom': 'Aligner le bas', + 'InsertFunction': 'Insérer une fonction', + 'Delete': 'Effacer', + 'Rename': 'Rebaptiser', + 'Hide': 'Cacher', + 'Unhide': 'Démasquer', + 'NumberFormat': 'Nombre Format', + } + } +}); + +function App() { + const spreadsheetRef = React.useRef(null); + React.useEffect(() => { + let spreadsheet = spreadsheetRef.current; + if (spreadsheet) { + //Applies cell and number formatting to specified range of the active sheet + spreadsheet.cellFormat({ fontWeight: 'bold', textAlign: 'center', verticalAlign: 'middle' }, 'A1:F1'); + spreadsheet.numberFormat('$#,##0.00', 'F2:F11'); + } + }, []); + + return ( + + + + + + + + + + + + + + + + + + ); +}; +export default App; +const root = createRoot(document.getElementById('root')!); +root.render(); +``` +Internationalization [`sample link`](https://stackblitz.com/edit/react-5rhnwd-ujh6z5?file=index.js) ## Right to left (RTL) @@ -421,7 +504,9 @@ RTL provides an option to switch the text direction and layout of the Spreadshee {% endhighlight %} {% endtabs %} +## Note +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/react-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/react-spreadsheet-editor) to knows how to present and manipulate data. ## See Also diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-aws-s3-bucket.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-aws-s3-bucket.md new file mode 100644 index 0000000000..1d4250afff --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-aws-s3-bucket.md @@ -0,0 +1,176 @@ +--- +layout: post +title: Opening excel from AWS S3 in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn about how to Open an Excel file from AWS S3 in EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2 and more details. +platform: document-processing +control: Open file from AWS S3 +documentation: ug +--- + +# Open file from AWS S3 + +To load a file from AWS S3 in a Spreadsheet Component, you can follow the steps below + +**Step 1:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 2:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +1. Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +2. Open the `SpreadsheetController.cs` file in your web service project. + +3. Import the required namespaces at the top of the file: + +```csharp + +using Amazon; +using Amazon.Runtime; +using Amazon.S3; +using Amazon.S3.Model; +using Amazon.S3.Transfer; + +``` + +4. Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields. + +```csharp + +private IConfiguration _configuration; +public readonly string _accessKey; +public readonly string _secretKey; +public readonly string _bucketName; + +public SpreadsheetController(IWebHostEnvironment hostingEnvironment, IMemoryCache cache, IConfiguration configuration) +{ + _hostingEnvironment = hostingEnvironment; + _cache = cache; + _configuration = configuration; + _accessKey = _configuration.GetValue("AccessKey"); + _secretKey = _configuration.GetValue("SecretKey"); + _bucketName = _configuration.GetValue("BucketName"); +} + +``` + +5. Create the `OpenFromS3()` method to open the document from the AWS S3 bucket. + +```csharp + +[Route("api/[controller]")] +[ApiController] +public class SpreadsheetController : ControllerBase +{ + [HttpPost] + [Route("OpenFromS3")] + public async Task OpenFromS3([FromBody] FileOptions options) + { + try + { + //Set AWS region and credentials + var region = RegionEndpoint.USEast1; + var config = new AmazonS3Config { RegionEndpoint = region }; + var credentials = new BasicAWSCredentials("your-access-key", "your-secretkey"); + //Create an S3 client to interact with AWS + using (var client = new AmazonS3Client(credentials, config)) + { + using (MemoryStream stream = new MemoryStream()) + { + //Get the full file name using input from the client + string bucketName = "your-bucket-name"; + string fileName = options.FileName + options.Extension; + //Download the file from S3 into memory + var response = await client.GetObjectAsync(new GetObjectRequest + { + BucketName = bucketName, + Key = fileName + }); + await response.ResponseStream.CopyToAsync(stream); + stream.Position = 0; // Reset stream position for reading + //Wrap the stream as a FormFile for processing + OpenRequest open = new OpenRequest + { + File = new FormFile(stream, 0, stream.Length, options.FileName, fileName) + }; + //Convert Excel file to JSON using Workbook.Open method. + var result = Workbook.Open(open); + //Return the JSON result to the client + return Content(result, "application/json"); + } + } + } + catch (Exception ex) + { + // Handle any errors and return a message + Console.WriteLine($"Error: {ex.Message}"); + return Content("Error occurred while processing the file."); + } + } + + // To receive file details from the client. + public class FileOptions + { + public string FileName { get; set; } = string.Empty; + public string Extension { get; set; } = string.Empty; + } +} + +``` + +6. Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration. + +```json + +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "AccessKey": "Your Access Key from AWS S3", + "SecretKey": "Your Secret Key from AWS S3", + "BucketName": "Your Bucket name from AWS S3" +} + +``` + +N> Replace **Your Access Key from AWS S3**, **Your Secret Key from AWS S3**, and **Your Bucket name from AWS S3** with your actual AWS access key, secret key and bucket name. + +**Step 3:** Modify the index File in the Spreadsheet sample to make a fetch call to the server to retrieve and load the Excel file from the AWS S3 bucket into the client-side spreadsheet. + +```ts + + + +// Function to open a spreadsheet file from AWS S3 via an API call +const openFromS3 = () => { + spreadsheet.showSpinner(); + // Make a POST request to the backend API to fetch the file from S3. Replace the URL with your local or hosted endpoint URL. + fetch('https://localhost:portNumber/api/spreadsheet/OpenFromS3', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + FileName: fileInfo.name, // Name of the file to open + Extension: fileInfo.extension, // File extension + }), + }) + .then((response) => response.json()) // Parse the response as JSON + .then((data) => { + spreadsheet.hideSpinner(); + // Load the spreadsheet data into the UI. + spreadsheet.openFromJson({ file: data, triggerEvent: true }); + }) + .catch((error) => { + // Log any errors that occur during the fetch operation + window.alert('Error importing file:', error); + }); +}; + +``` + +N> The **AWSSDK.S3** NuGet package must be installed in your application to use the previous code example. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-azure-blob-storage.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-azure-blob-storage.md new file mode 100644 index 0000000000..ce426abca4 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-azure-blob-storage.md @@ -0,0 +1,154 @@ +--- +layout: post +title: Open excel from Azure Blob in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn about how to Open an Excel file from Azure Blob Storage in EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2. +platform: document-processing +control: Open file from Azure Blob Storage +documentation: ug +--- + +# Open file from Azure Blob Storage + +To load a file from Azure Blob Storage in a Spreadsheet Component, you can follow the steps below + +**Step 1:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 2:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +1. Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +2. Open the `SpreadsheetController.cs` file in your web service project. + +3. Import the required namespaces at the top of the file: + +```csharp + +using System; +using System.IO; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Syncfusion.EJ2.Spreadsheet; +using Azure.Storage.Blobs; +using Azure.Storage.Blobs.Specialized; + +``` + +4. Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields. + +```csharp + +private readonly string _storageConnectionString; +private readonly string _storageContainerName; + +public SpreadsheetController(IConfiguration configuration) +{ + // Fetch values from appsettings.json + _storageConnectionString = configuration.GetValue("connectionString"); + _storageContainerName = configuration.GetValue("containerName"); +} + +``` + +5. Create the `OpenFromAzure()` method to open the document from the Azure Blob Storage. + +```csharp + +[HttpPost] +[Route("OpenFromAzure")] +public async Task OpenFromAzure([FromBody] FileOptions options) +{ + if (options == null || string.IsNullOrWhiteSpace(options.FileName) || string.IsNullOrWhiteSpace(options.Extension)) + return BadRequest("Invalid file options."); + + try + { + using (MemoryStream stream = new MemoryStream()) + { + string fileName = options.FileName + options.Extension; + + // Connect to Azure Blob Storage + BlobServiceClient blobServiceClient = new BlobServiceClient(_storageConnectionString); + BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient(_storageContainerName); + BlockBlobClient blockBlobClient = containerClient.GetBlockBlobClient(fileName); + + // Download file into memory + await blockBlobClient.DownloadToAsync(stream); + stream.Position = 0; + + // Wrap stream as FormFile and convert to Spreadsheet-compatible JSON + OpenRequest open = new OpenRequest + { + File = new FormFile(stream, 0, stream.Length, options.FileName, fileName) + }; + + string result = Workbook.Open(open); + return Content(result, "application/json"); + } + } + catch (Exception ex) + { + Console.WriteLine($"Error: {ex.Message}"); + return Content("Error occurred while processing the file."); + } +} + +// DTO that receives file details from the client +public class FileOptions +{ + public string FileName { get; set; } = string.Empty; + public string Extension { get; set; } = string.Empty; +} + +``` + +6. Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration. + +```json + +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "connectionString": "DefaultEndpointsProtocol=https;AccountName=yourAccount;AccountKey=yourKey;EndpointSuffix=core.windows.net", + "containerName": "your-container-name" +} + +``` +N> Note: Install the Azure.Storage.Blobs NuGet package in the service project. + +**Step 3:** Modify the index File in the Spreadsheet sample to make a fetch call to the server to retrieve and load the Excel file from the Google Cloud Storage into the client-side spreadsheet. + +```ts + +; + +const openFromAzure = () => { + spreadsheet.showSpinner(); + + fetch("https://localhost:portNumber/api/spreadsheet/OpenFromAzure", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + FileName: fileInfo.name, // e.g., "Report" + Extension: fileInfo.extension // e.g., ".xlsx" + }) + }) + .then((res) => res.json()) + .then((data) => { + spreadsheet.hideSpinner(); + spreadsheet.openFromJson({ file: data, triggerEvent: true }); + }) + .catch((err) => window.alert("Error importing file: " + err)); +}; + +``` \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-google-cloud-storage.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-google-cloud-storage.md new file mode 100644 index 0000000000..5ea75dc5a0 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-google-cloud-storage.md @@ -0,0 +1,145 @@ +--- +layout: post +title: Open excel from Google Cloud in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn about how to Open an Excel file from Google Cloud Storage in EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2. +platform: document-processing +control: Open file from Google Cloud Storage +documentation: ug +--- + +# Open file from Google Cloud Storage + +To load a file from Google Cloud Storage in a Spreadsheet Component, you can follow the steps below + +**Step 1:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 2:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +1. Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +2. Open the `SpreadsheetController.cs` file in your web service project. + +3. Import the required namespaces at the top of the file: + +```csharp + +using Google.Apis.Auth.OAuth2; +using Google.Cloud.Storage.V1; +using Syncfusion.EJ2.Spreadsheet; + +``` + +4. Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields. + +```Csharp + +private readonly string _bucketName; +private readonly StorageClient _storageClient; + +public SpreadsheetController(IConfiguration configuration) +{ + // Path of the JSON key downloaded from Google Cloud + string keyFilePath = configuration.GetValue("GoogleKeyFilePath"); + + // Create StorageClient with service-account credentials + var credentials = GoogleCredential.FromFile(keyFilePath); + _storageClient = StorageClient.Create(credentials); + + // Bucket that stores the Excel files + _bucketName = configuration.GetValue("BucketName"); +} + +``` + +5. Create the `OpenFromGoogleCloud()` method to open the document from the Google Cloud Storage. + +```Csharp + +[HttpPost] +[Route("OpenFromGoogleCloud")] +public IActionResult OpenFromGoogleCloud([FromBody] FileOptions options) +{ + try + { + using MemoryStream stream = new MemoryStream(); + + // / + string fileName = options.FileName + options.Extension; + + // Download the object into memory + _storageClient.DownloadObject(_bucketName, fileName, stream); + stream.Position = 0; + + // Feed the stream to Syncfusion to convert it into JSON + OpenRequest open = new OpenRequest + { + File = new FormFile(stream, 0, stream.Length, options.FileName, fileName) + }; + + string result = Workbook.Open(open); + return Content(result, "application/json"); + } + catch (Exception ex) + { + Console.WriteLine($"Error: {ex.Message}"); + return Content("Error occurred while processing the file."); + } +} + +// DTO that receives file details from the client +public class FileOptions +{ + public string FileName { get; set; } = string.Empty; + public string Extension { get; set; } = string.Empty; +} + +``` + +6. Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration. + +```Json + +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "GoogleKeyFilePath": "path/to/service-account-key.json", + "BucketName": "your-gcs-bucket-name" +} + +``` + +N> Note: Install the Google.Cloud.Storage.V1 NuGet package in the service project. + +**Step 3:** Modify the index File in the Spreadsheet sample to make a fetch call to the server to retrieve and load the Excel file from the Google Cloud Storage into the client-side spreadsheet. + +```typescript +; + +const openFromGoogleCloud = () => { + spreadsheet.showSpinner(); + + fetch("https://localhost:portNumber/api/spreadsheet/OpenFromGoogleCloud", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + FileName: fileInfo.name, // e.g., "Report" + Extension: fileInfo.extension, // e.g., ".xlsx" + }), + }) + .then((res) => res.json()) + .then((data) => { + spreadsheet.hideSpinner(); + spreadsheet.openFromJson({ file: data, triggerEvent: true }); + }) + .catch((err) => window.alert("Error importing file: " + err)); +}; +``` \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-google-drive.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-google-drive.md new file mode 100644 index 0000000000..7b52bf0ae5 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/open-excel-file/from-google-drive.md @@ -0,0 +1,188 @@ +--- +layout: post +title: Open excel from Google Drive in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn about how to Open an Excel file from Google Drive in EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2. +platform: document-processing +control: Open file from Google Drive +documentation: ug +--- + +# Open file from Google Drive + +To load a file from Google Drive in a Spreadsheet Component, you can follow the steps below + +**Step 1:** Set up Google Drive API + +You must set up a project in the Google Developers Console and enable the Google Drive API. Obtain the necessary credentials to access the API. For more information, view the official [link](https://developers.google.com/workspace/drive/api/guides/enable-sdk). + +**Step 2:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 3:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +* Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +* Open the `SpreadsheetController.cs` file in your web service project. + +* Import the required namespaces at the top of the file: + +```csharp + +using Google.Apis.Auth.OAuth2; +using Google.Apis.Drive.v3; +using Google.Apis.Services; +using Syncfusion.EJ2.Spreadsheet; + +``` + +* Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields. + +```csharp + +//variables for storing GDrive folderId, ApplicationName and Service-Accountkey credentials +public readonly string folderId; +public readonly string applicationName; +public readonly string credentialPath; + +//constructor for assigning credentials +public SpreadsheetController(IConfiguration configuration) +{ + folderId = configuration.GetValue("FolderId"); + credentialPath = configuration.GetValue("CredentialPath"); + applicationName = configuration.GetValue("ApplicationName"); +} + +``` + +* Create the `OpenExcelFromGoogleDrive()` method to open the document from the Google Drive. + +```csharp + +[HttpPost] +[Route("OpenExcelFromGoogleDrive")] +public async Task OpenExcelFromGoogleDrive([FromBody] FileOptions options) +{ +try +{ + // Create a memory stream to store file data + MemoryStream stream = new MemoryStream(); + + // Authenticate using Service Account + GoogleCredential credential; + // Load Google service account credentials + using (var streamKey = new FileStream(credentialPath, FileMode.Open, FileAccess.Read)) + { + credential = GoogleCredential.FromStream(streamKey) + .CreateScoped(DriveService.Scope.Drive); + } + + // Create Google Drive API service + var service = new DriveService(new BaseClientService.Initializer() + // Initialize Google Drive API client + { + HttpClientInitializer = credential, + ApplicationName = applicationName, + }); + + // List Excel files in Google Drive folder + var listRequest = service.Files.List(); + // Query Google Drive for Excel, CSV files in the specified folder + listRequest.Q = $"(mimeType='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' or mimeType='application/vnd.ms-excel' or mimeType='text/csv') and '{folderId}' in parents and trashed=false"; + listRequest.Fields = "files(id, name)"; + var files = await listRequest.ExecuteAsync(); + // Find the requested file + string fileIdToDownload = files.Files.FirstOrDefault(f => f.Name == options.FileName + options.Extension)?.Id; + // Get the file ID for the requested file name + if (string.IsNullOrEmpty(fileIdToDownload)) + // Get the file ID for the requested file name + return NotFound("File not found in Google Drive."); + // Download the file + var request = service.Files.Get(fileIdToDownload); + await request.DownloadAsync(stream); + // Download file content into memory stream + stream.Position = 0; + // Prepare file for Syncfusion Excel processing + OpenRequest open = new OpenRequest + // Wrap downloaded stream as FormFile for Syncfusion processing + { + File = new FormFile(stream, 0, stream.Length, options.FileName, options.FileName + options.Extension) + }; + + // Convert Excel file to JSON using Syncfusion XlsIO + var result = Workbook.Open(open); + return Content(result, "application/json"); +} +catch (Exception ex) +{ + return BadRequest("Error occurred while processing the file: " + ex.Message); +} +} + +// Class to store FileOptions +public class FileOptions +{ + public string FileName { get; set; } = string.Empty; + public string Extension { get; set; } = string.Empty; +} + +``` + +* Open the `appsettings.json` file in your web service project, add your Google Drive configuration details. + +```json + +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "CredentialPath": "path-to-your-service-account-key.json", + "FolderId": "your-google-drive-folder-id", + "ApplicationName": "YourAppName" +} + +``` + +N> Replace the **credential path**, **folderId** and **application name** in json file with your actual Google drive folder ID , your name for your application and the path for the JSON file. + +**Step 4:** Modify the index File in the Spreadsheet sample to make a fetch call to the server to retrieve and process the Excel file from the Google Drive and load the JSON result into the client-side spreadsheet using the [openFromJson](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#openfromjson) method. + +```typescript + + +const openFromGoogleDrive = () => { + spreadsheet.showSpinner(); + // Make a POST request to the backend API to open the file from Google Drive. + // Replace the URL with your local or hosted endpoint URL. + fetch('https://localhost:your_port_number/api/spreadsheet/OpenExcelFromGoogleDrive', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + FileName: fileInfo.name, // Name of the file to open + Extension: fileInfo.extension, // File extension (.xlsx) + }), + }) + .then((response) => response.json()) // Parse the response as JSON + .then((data) => { + spreadsheet.hideSpinner(); + // Load the spreadsheet data into the UI + spreadsheet.openFromJson({ file: data, triggerEvent: true }); + }) + .catch((error) => { + spreadsheet.hideSpinner(); + window.alert('Error importing file from Google Drive: ' + error); + }); +}; +``` + +N> The Google.Apis.Drive.v3 NuGet package must be installed in your application to use the previous code example. + +[View sample in GitHub](https://github.com/SyncfusionExamples/syncfusion-react-spreadsheet-google-drive-integration) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/print.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/print.md index 76de46051e..d03a564147 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/print.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/print.md @@ -7,7 +7,6 @@ control: Print documentation: ug --- - # Print in ASP.NET Core Spreadsheet control The printing functionality allows end-users to print all contents, such as tables, charts, images, and formatted contents, available in the active worksheet or entire workbook in the Spreadsheet. You can enable or disable print functionality by using the `allowPrint` property, which defaults to **true**. diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/protect-sheet.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/protect-sheet.md index 3bb05009f8..744221392e 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/protect-sheet.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/protect-sheet.md @@ -7,18 +7,22 @@ control: Protect Sheet documentation: ug --- +# Protect sheet in ASP.NET Core Spreadsheet Control -# Protection in ASP.NET Core Spreadsheet Control +Sheet protection allows you to prevent users from modifying data in the Spreadsheet. +When a sheet is protected, editing actions such as typing, formatting, or deleting content are restricted, ensuring that important data remains secure. -Sheet protection helps you to prevent the users from modifying the data in the spreadsheet. +You can enable protection by using the [`protectSheet`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#protectsheet) method. +This locks the sheet and restricts user actions based on the protection settings you configure. ## Protect Sheet Protect sheet feature helps you to prevent the unknown users from accidentally changing, editing, moving, or deleting data in a spreadsheet. And you can also protect the sheet with password. You can use the [`isProtected`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_IsProtected) property to enable or disable the Protecting functionality. -N> The default value for `isProtected` property is `false`. +> * The default value for `isProtected` property is `false`. -By default in protected sheet, selecting, formatting, inserting, deleting functionalities are disabled. To enable some of the above said functionalities the `protectSettings` options are used in a protected spreadsheet. +By default in protected sheet, selecting, formatting, inserting, deleting functionalities are disabled. To enable some of the above said functionalities +the `protectSettings` options are used in a protected spreadsheet. The available `protectSettings` options in spreadsheet are, @@ -30,7 +34,7 @@ The available `protectSettings` options in spreadsheet are, | `Format Columns` | Used to perform Column formatting. | | `Insert Link` | Used to perform Hyperlink Insertions. | -N> * The default value for all `protectSettings` options are `false`. +> * The default value for all `protectSettings` options are `false`. By default, the `Protect Sheet` module is injected internally into the Spreadsheet to perform sheet protection function. @@ -40,9 +44,10 @@ In the active Spreadsheet, the sheet protection can be done by any of the follow * Select the Protect Sheet item in the Ribbon toolbar under the Data Tab, and then select your desired options. * Right-click the sheet tab, select the Protect Sheet item in the context menu, and then select your desired options. -* Use the `protectSheet()` method programmatically. +* Use the [`protectSheet`](https://ej2.syncfusion.com/javascript +/documentation/api/spreadsheet#protectsheet) method programmatically. -The following example shows `Protect Sheet` functionality with password in the Spreadsheet control. +The following example shows `Protect Sheet` functionality in the Spreadsheet control. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -53,27 +58,26 @@ The following example shows `Protect Sheet` functionality with password in the S {% endhighlight %} {% endtabs %} - - ### Limitations of Protect sheet * Password encryption is not supported ## Unprotect Sheet -Unprotect sheet is used to enable all the functionalities that are already disabled in a protected spreadsheet. +The **Unprotect Sheet** feature restores all functionalities that were disabled in a protected spreadsheet. +Once a sheet is unprotected, users can edit, format, insert, delete, and move data without restrictions. **User Interface**: -In the active Spreadsheet, the sheet can be unprotected by any of the following ways: +In the active Spreadsheet, the sheet Unprotection can be done by any of the following ways: * Select the `Unprotect Sheet` item in the Ribbon toolbar under the Data Tab. * Right-click the sheet tab, select the `Unprotect Sheet` item in the context menu. -* Use the `unprotectSheet()` method programmatically. +* Use the [`unprotectSheet`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#unprotectsheet) method programmatically. ## Unlock the particular cells in the protected sheet -In protected spreadsheet, to make some particular cell or range of cells are editable, you can use `lockCells()` method, with the parameter `range` and `isLocked` property as false. +In protected spreadsheet, to make some particular cell or range of cells are editable, you can use [`lockCells`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#lockcells) method, with the parameter `range` and `isLocked` property as false. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -86,9 +90,9 @@ In protected spreadsheet, to make some particular cell or range of cells are edi ## Make cells read-only without protecting worksheet -Previously, you could make cells read-only by protecting the entire sheet using the `protectSheet` method or through the UI option. Meanwhile, to make a specific range of cells editable within a protected sheet, you needed to use the `lockCells` method, passing the `range` parameter and setting the `isLocked` property to **false**. +Previously, you could make cells read-only by protecting the entire sheet using the [protectSheet](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#protectsheet) method or through the UI option. Meanwhile, to make a specific range of cells editable within a protected sheet, you needed to use the [lockCells](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#lockcells) method, passing the `range` parameter and setting the `isLocked` property to **false**. -Now, you can make an entire row, an entire column, or a specific range of cells read-only using the `setRangeReadOnly` method without protecting the entire sheet. This method accepts three parameters, as detailed in the following table: +Now, you can make an entire row, an entire column, or a specific range of cells read-only using the [setRangeReadOnly](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#setrangereadonly) method without protecting the entire sheet. This method accepts three parameters, as detailed in the following table: | Parameter | Description | |-----|------| @@ -109,7 +113,38 @@ spreadsheet.setRangeReadOnly(true, '3:3', 0) spreadsheet.setRangeReadOnly(true, 'A:A', 0) ``` -You can make the cells read-only in the cell data binding by setting the `isReadOnly` property to **true** for the respective rows, columns, and cells. +You can make the cells read-only in the cell data binding by setting the `isReadOnly` property to **true** for the respective rows, columns, and cells. Please refer to the code snippet below to see how to set cells to read-only in the cell data binding: + +**Client Side**: + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} + + + + + + + + + + + + + + + + + + + + + + + + +{% endhighlight %} +{% endtabs %} The following example demonstrates how to make rows, columns, and cells read-only without protecting the sheet: @@ -124,13 +159,9 @@ The following example demonstrates how to make rows, columns, and cells read-onl ## Protect Workbook -Protect workbook feature helps you to protect the workbook so that users cannot insert, delete, rename, hide the sheets in the spreadsheet. - -You can use the [`password`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_Password) property to protect workbook with password. - -You can use the [`isProtected`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_IsProtected) property to protect or unprotect the workbook without the password. +Protect workbook feature helps you to protect the workbook so that users cannot insert, delete, rename, hide the sheets in the spreadsheet. You can use the [`password`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_Password) property to protect workbook with password. You can use the [`isProtected`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_IsProtected) property to protect or unprotect the workbook without the password. -N> The default value for `isProtected` property is `false`. +> The default value for `isProtected` property is `false`. **User Interface**: @@ -147,9 +178,7 @@ The following example shows `Protect Workbook` by using the [`isProtected`](http {% endhighlight %} {% endtabs %} - - -The following example shows `Protect Workbook` by using the [`password`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_Password) property in the Spreadsheet control. To unprotect the workbook, click the unprotect workbook button in the data tab and provide the password as Syncfusion® in the dialog box. +The following example shows `Protect Workbook` by using the [`password`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_Password) property in the Spreadsheet control. To unprotect the workbook, click the unprotect workbook button in the data tab and provide the password as syncfusion® in the dialog box. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -160,11 +189,9 @@ The following example shows `Protect Workbook` by using the [`password`](https:/ {% endhighlight %} {% endtabs %} - - ## Unprotect Workbook -Unprotect Workbook is used to enable the insert, delete, rename, move, copy, hide or unhide sheets feature in the spreadsheet. +The **Unprotect Workbook** feature restores full access to workbook-level operations such as inserting, deleting, renaming, moving, copying, hiding and unhiding sheets that were restricted when the workbook was protected. **User Interface**: @@ -172,6 +199,10 @@ In the active Spreadsheet, the workbook can be unprotected in any of the followi * Select the `Unprotect Workbook` item in the Ribbon toolbar under the Data Tab and provide the valid password in the dialog box. +## Note + +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. + ## See Also * [Hyperlink](./link) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/ribbon.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/ribbon.md index e936f08242..30f1d1442e 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/ribbon.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/ribbon.md @@ -7,7 +7,6 @@ control: Ribbon documentation: ug --- - # Ribbon in ASP.NET Core Spreadsheet control It helps to organize a spreadsheet’s features into a series of tabs. By clicking the expand or collapse icon, you can expand or collapse the ribbon toolbar dynamically. @@ -18,20 +17,15 @@ You can customize the ribbon using the following methods, | Method | Action | |-------|---------| -| `hideRibbonTabs` | Used to show or hide the existing ribbon tabs. | -| `enableRibbonTabs` | Used to enable or disable the existing -ribbon tabs. | -| `addRibbonTabs` | Used to add custom ribbon tabs. | -| `hideToolbarItems`| Used to show or hide the existing ribbon -toolbar items. | -| `enableToolbarItems` | Used to enable or disable the specified -toolbar items. | -| `addToolbarItems` | Used to add the custom items in ribbon -toolbar. | -| `hideFileMenuItems` | Used to show or hide the ribbon file menu -items. | -| `enableFileMenuItems`| Used to enable or disable file menu items. | -| `addFileMenuItems`| Used to add custom file menu items. | +| [`hideRibbonTabs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#hideribbontabs) | Used to show or hide the existing ribbon tabs. | +| [`enableRibbonTabs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#enableribbontabs) | Used to enable or disable the existing ribbon tabs. | +| [`addRibbonTabs`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#addribbontabs) | Used to add custom ribbon tabs. | +| [`hideToolbarItems`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#hidetoolbaritems) | Used to show or hide the existing ribbon toolbar items. | +| [`enableToolbarItems`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#enabletoolbaritems) | Used to enable or disable the specified toolbar items. | +| [`addToolbarItems`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#addtoolbaritems) | Used to add the custom items in ribbon toolbar. | +| [`hideFileMenuItems`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#hidefilemenuitems) | Used to show or hide the ribbon file menu items. | +| [`enableFileMenuItems`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#enablefilemenuitems) | Used to enable or disable file menu items. | +| [`addFileMenuItems`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet/#addfilemenuitems) | Used to add custom file menu items. | The following code example shows the usage of ribbon customization. @@ -44,7 +38,9 @@ The following code example shows the usage of ribbon customization. {% endhighlight %} {% endtabs %} +## Note +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. ## See Also diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/rows-and-columns.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/rows-and-columns.md index 8e291b564b..617837f4ea 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/rows-and-columns.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/rows-and-columns.md @@ -7,14 +7,15 @@ control: Rows And Columns documentation: ug --- - # Rows and columns in ASP.NET Core Spreadsheet control -Spreadsheet is a tabular format consisting of rows and columns. The intersection point of rows and columns are called as cells. The list of operations that you can perform in rows and columns are, +A spreadsheet is organized in a tabular format consisting of **rows** and **columns**. The intersection of a row and a column is called a **cell**. + +The list of operations that you can perform on rows and columns includes: -* Insert -* Delete -* Show and Hide +* **Insert** – Add new rows or columns to the worksheet. +* **Delete** – Remove existing rows or columns from the worksheet. +* **Show and Hide** – Control the visibility of rows and columns by hiding or unhiding them. ## Insert @@ -24,7 +25,7 @@ You can insert rows or columns anywhere in a spreadsheet. Use the [`allowInsert` The rows can be inserted in the following ways, -* Using `insertRow` method, you can insert the rows once the component is loaded. +* Using [`insertRow`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#insertrow) method, you can insert the rows once the component is loaded. * Using context menu, insert the empty rows in the desired position. The following code example shows the options for inserting rows in the spreadsheet. @@ -38,13 +39,11 @@ The following code example shows the options for inserting rows in the spreadshe {% endhighlight %} {% endtabs %} - - ### Column The columns can be inserted in the following ways, -* Using `insertColumn` method, you can insert the columns once the component is loaded. +* Using [`insertColumn`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#insertcolumn) method, you can insert the columns once the component is loaded. * Using context menu, insert the empty columns in the desired position. The following code example shows the options for inserting columns in the spreadsheet. @@ -58,15 +57,13 @@ The following code example shows the options for inserting columns in the spread {% endhighlight %} {% endtabs %} - - ## Delete Delete support provides an option for deleting the rows and columns in the spreadsheet. Use [`allowDelete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowDelete) property to enable or disable the delete option in Spreadsheet. The rows and columns can be deleted dynamically in the following ways, -* Using `delete` method, you can delete the loaded rows and columns. +* Using [`delete`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#delete) method, you can delete the loaded rows and columns. * Using context menu, you can delete the selected rows and columns. The following code example shows the delete operation of rows and columns in the spreadsheet. @@ -80,7 +77,14 @@ The following code example shows the delete operation of rows and columns in the {% endhighlight %} {% endtabs %} +## Limitations of insert and delete + +The following features have some limitations in Insert/Delete: +* Insert row/column between the formatting applied cells. +* Insert row/column between the data validation. +* Insert row/column between the conditional formatting applied cells. +* Insert/delete row/column between the filter applied cells. ## Hide and show @@ -113,15 +117,13 @@ The following code example shows the hide/show rows and columns operation in the {% endhighlight %} {% endtabs %} - - ## Size -You can change the size of rows and columns in the spreadsheet by using `setRowsHeight` and `setColumnsWidth` methods. +You can change the size of rows and columns in the spreadsheet by using [setRowsHeight](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#setrowsheight) and [setColumnsWidth](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#setcolumnswidth) methods. ### Row -You can change the height of single or multiple rows by using the `setRowsHeight` method. +You can change the height of single or multiple rows by using the [setRowsHeight](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#setrowsheight) method. You can provide the following type of ranges to the method: @@ -130,6 +132,8 @@ You can provide the following type of ranges to the method: * Multiple rows with discontinuous range: `['1:10', '15:25', '30:40']` * Multiple rows with different sheets: `[Sheet1!1:50, 'Sheet2!1:50', 'Sheet3!1:50']` +Additionally, each row model includes a [customHeight](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.RowModel.html#Syncfusion_EJ2_Spreadsheet_RowModel_CustomHeight) property that indicates the row height was explicitly set either by manually adjusting the row header boundary or programmatically. When [customHeight](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.RowModel.html#Syncfusion_EJ2_Spreadsheet_RowModel_CustomHeight) is true, the height is treated as manually defined and will not change automatically when enabling wrap text, increasing font size, or changing the font family; the height remains fixed until the user or code updates it. + The following code example shows how to change the height for single/multiple rows in the spreadsheet. {% tabs %} @@ -143,7 +147,7 @@ The following code example shows how to change the height for single/multiple ro ### Column -You can change the width of single or multiple columns by using the `setColumnsWidth` method. +You can change the width of single or multiple columns by using the [setColumnsWidth](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#setcolumnswidth) method. You can provide the following type of ranges to the method: @@ -152,6 +156,8 @@ You can provide the following type of ranges to the method: * Multiple columns with discontinuous range: `['A:C', 'G:I', 'K:M']` * Multiple columns with different sheets: `[Sheet1!A:H, 'Sheet2!A:H', 'Sheet3!A:H']` +Additionally, each column model includes a [customWidth](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.ColumnModel.html#Syncfusion_EJ2_Spreadsheet_ColumnModel_Width) property that indicates the column width was explicitly set either by manually adjusting the column header boundary or programmatically. When [customWidth](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.ColumnModel.html#Syncfusion_EJ2_Spreadsheet_ColumnModel_Width) is true, the width is treated as manually defined. + The following code example shows how to change the width for single/multiple columns in the spreadsheet. {% tabs %} @@ -175,14 +181,9 @@ The following code example shows how to change the text in the column headers. {% endhighlight %} {% endtabs %} -## Limitations of insert and delete - -The following features have some limitations in Insert/Delete: +## Note -* Insert row/column between the formatting applied cells. -* Insert row/column between the data validation. -* Insert row/column between the conditional formatting applied cells. -* Insert/delete row/column between the filter applied cells. +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. ## See Also diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-aws-s3-bucket.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-aws-s3-bucket.md new file mode 100644 index 0000000000..d5efad4ba6 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-aws-s3-bucket.md @@ -0,0 +1,159 @@ +--- +layout: post +title: Saving excel to AWS S3 in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn how to save a Excel file from AWS S3 in EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2 and more details. +platform: document-processing +control: Save file to AWS S3 +documentation: ug +--- + +# Save spreadsheet to AWS S3 + +To save a file to the AWS S3, you can follow the steps below. + +**Step 1:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 2:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +1. Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +2. Open the `SpreadsheetController.cs` file in your web service project. + +3. Import the required namespaces at the top of the file: + +```csharp + +using Amazon; +using Amazon.Runtime; +using Amazon.S3; +using Amazon.S3.Model; +using Amazon.S3.Transfer; + +``` + +4. Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields + +```csharp + +private IConfiguration _configuration; +public readonly string _accessKey; +public readonly string _secretKey; +public readonly string _bucketName; + +public SpreadsheetController(IWebHostEnvironment hostingEnvironment, IMemoryCache cache, IConfiguration configuration) +{ + _hostingEnvironment = hostingEnvironment; + _cache = cache; + _configuration = configuration; + _accessKey = _configuration.GetValue("AccessKey"); + _secretKey = _configuration.GetValue("SecretKey"); + _bucketName = _configuration.GetValue("BucketName"); +} + +``` + +5. Create the `SaveToS3()` method to open the document from the AWS S3 bucket + +```csharp + +[HttpPost] +[Route("SaveToS3")] +public async Task SaveToS3([FromForm] SaveSettings saveSettings) +{ + try + { + // Convert spreadsheet JSON to Excel file stream + Stream fileStream = Workbook.Save(saveSettings); + fileStream.Position = 0; // Reset stream for upload + + // Set AWS region and credentials + var region = RegionEndpoint.USEast1; + var config = new AmazonS3Config { RegionEndpoint = region }; + var credentials = new BasicAWSCredentials("your-access-key", "your-secretkey"); + + // Define S3 bucket and file name + string bucketName = "your-bucket-name"; + string fileName = saveSettings.FileName + "." + saveSettings.SaveType.ToString().ToLower(); + + // Initialize S3 client + using (var client = new AmazonS3Client(credentials, config)) + { + // Use TransferUtility to upload the file stream + var fileTransferUtility = new TransferUtility(client); + await fileTransferUtility.UploadAsync(fileStream, bucketName, fileName); + } + + // Return success message + return Ok("Excel file successfully saved to AWS S3."); + } + catch (Exception ex) + { + } +} + +``` + +6. Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration + +```json + +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "AccessKey": "Your Access Key from AWS S3", + "SecretKey": "Your Secret Key from AWS S3", + "BucketName": "Your Bucket name from AWS S3" +} + +``` + +N> Replace **Your Access Key from AWS S3**, **Your Secret Key from AWS S3**, and **Your Bucket name from AWS S3** with your actual AWS access key, secret key and bucket name + +**Step 3:** Modify the index File in the Spreadsheet sample to using [`saveAsJson`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveasjson) method to serialize the spreadsheet and send it to the back-end + +```js +// Function to save the current spreadsheet to AWS S3 via an API call +const saveToS3 = () => { + // Convert the current spreadsheet to JSON format + spreadsheet.saveAsJson().then((json) => { + const formData = new FormData(); + + // Append necessary data to the form for the API request + formData.append('FileName', loadedFileInfo.fileName); // Name of the file to save + formData.append('saveType', loadedFileInfo.saveType); // Save type + formData.append('JSONData', JSON.stringify(json.jsonObject.Workbook)); // Spreadsheet data + formData.append( + 'PdfLayoutSettings', + JSON.stringify({ FitSheetOnOnePage: false }) // PDF layout settings + ); + + // Make a POST request to the backend API to save the file to S3. Replace the URL with your local or hosted endpoint URL. + fetch('https://localhost:portNumber/api/spreadsheet/SaveToS3', { + method: 'POST', + body: formData, + }) + .then((response) => { + // Check if the response is successful + if (!response.ok) { + throw new Error( + `Save request failed with status ${response.status}` + ); + } + window.alert('Workbook saved successfully.'); + }) + .catch((error) => { + // Log any errors that occur during the save operation + window.alert('Error saving to server:', error); + }); + }); +}; +``` + +N> The **AWSSDK.S3** NuGet package must be installed in your application to use the previous code example. diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-azure-blob-storage.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-azure-blob-storage.md new file mode 100644 index 0000000000..8ca5bdb8aa --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-azure-blob-storage.md @@ -0,0 +1,126 @@ +--- +layout: post +title: Save excel to Azure Blob in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn about how to Save an Excel file from Azure Blob Storage in EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2. +platform: document-processing +control: Save file to Azure Blob Storage +documentation: ug +--- + +# Save file to Azure Cloud Storage + +To save a file to Azure Blob Storage in a Spreadsheet Component, you can follow the steps below + +**Step 1:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 2:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +1. Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +2. Open the `SpreadsheetController.cs` file in your web service project. + +3. Import the required namespaces at the top of the file: + +```csharp + +using System; +using System.IO; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Syncfusion.EJ2.Spreadsheet; +using Azure.Storage.Blobs; + +``` + +4. Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields. + +```csharp + +private readonly string _storageConnectionString; +private readonly string _storageContainerName; + +public SpreadsheetController(IConfiguration configuration) +{ + _storageConnectionString = configuration.GetValue("connectionString"); + _storageContainerName = configuration.GetValue("containerName"); +} + +``` + +5. Create the `SaveToAzure()` method to save the document to the Azure Blob storage. + +```csharp + +[HttpPost] +[Route("SaveToAzure")] +public async Task SaveToAzure([FromForm] SaveSettings saveSettings) +{ + if (saveSettings == null || string.IsNullOrWhiteSpace(saveSettings.FileName)) + return BadRequest("Invalid save settings."); + + try + { + // Convert spreadsheet JSON to Excel/PDF/CSV stream + Stream fileStream = Workbook.Save(saveSettings); + fileStream.Position = 0; + + // Define Azure Blob Storage client + BlobServiceClient blobServiceClient = new BlobServiceClient(_storageConnectionString); + BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient(_storageContainerName); + + // Define blob name using file name and save type + string blobName = $"{saveSettings.FileName}.{saveSettings.SaveType.ToString().ToLower()}"; + BlobClient blobClient = containerClient.GetBlobClient(blobName); + + // Upload the Excel file stream to Azure Blob Storage (overwrite if exists) + await blobClient.UploadAsync(fileStream, overwrite: true); + + return Ok("Excel file successfully saved to Azure Blob Storage."); + } + catch (Exception ex) + { + return BadRequest("Error saving file to Azure Blob Storage: " + ex.Message); + } +} + +``` + +N> Note: Install the Azure.Storage.Blobs NuGet package in the service project. Ensure the configured connection string has permissions to read and write blobs in the specified container. + +**Step 3:** Modify the index File in the Spreadsheet sample to using [`saveAsJson`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveasjson) method to serialize the spreadsheet and send it to the back-end + +```js + +; + +const saveToAzure = () => { + spreadsheet.saveAsJson().then((json) => { + const formData = new FormData(); + formData.append("FileName", loadedFileInfo.fileName); // e.g., "Report" + formData.append("saveType", loadedFileInfo.saveType); // e.g., "Xlsx" + formData.append("JSONData", JSON.stringify(json.jsonObject.Workbook)); + formData.append( + "PdfLayoutSettings", + JSON.stringify({ FitSheetOnOnePage: false }) + ); + + fetch("https://localhost:portNumber/api/spreadsheet/SaveToAzure", { + method: "POST", + body: formData + }) + .then((res) => { + if (!res.ok) { + throw new Error(`Save failed with status ${res.status}`); + } + window.alert("Workbook saved successfully to Azure Blob Storage."); + }) + .catch((err) => window.alert("Error saving to server: " + err)); + }); +}; + +``` diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-google-cloud-storage.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-google-cloud-storage.md new file mode 100644 index 0000000000..97e4cd20b3 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-google-cloud-storage.md @@ -0,0 +1,114 @@ +--- +layout: post +title: Save excel to Google Cloud in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn about how to Save an Excel file from Google Cloud Storage in EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2. +platform: document-processing +control: Save file to Google Cloud Storage +documentation: ug +--- + +# Save file to Google Cloud Storage + +To save a file to Google Cloud Storage in a Spreadsheet Component, you can follow the steps below + +**Step 1:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 2:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +1. Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +2. Open the `SpreadsheetController.cs` file in your web service project. + +3. Import the required namespaces at the top of the file: + +```csharp + +using Google.Apis.Auth.OAuth2; +using Google.Cloud.Storage.V1; +using Syncfusion.EJ2.Spreadsheet; + +``` + +4. Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields. + +```csharp +private readonly string _bucketName; +private readonly StorageClient _storageClient; + +public SpreadsheetController(IConfiguration configuration) +{ + // Path of the JSON key downloaded from Google Cloud + string keyFilePath = configuration.GetValue("GoogleKeyFilePath"); + + // Create StorageClient with service-account credentials + var credentials = GoogleCredential.FromFile(keyFilePath); + _storageClient = StorageClient.Create(credentials); + + // Bucket that stores the Excel files + _bucketName = configuration.GetValue("BucketName"); +} +``` + +5. Create the `SaveToGoogleCloud()` method to save the document to the Google Cloud storage. + +```csharp +[HttpPost] +[Route("SaveToGoogleCloud")] +public async Task SaveToGoogleCloud([FromForm] SaveSettings saveSettings) +{ + try + { + // Convert spreadsheet JSON to Excel stream + Stream fileStream = Workbook.Save(saveSettings); + fileStream.Position = 0; + + // File name inside the bucket + string fileName = $"{saveSettings.FileName}.{saveSettings.SaveType.ToString().ToLower()}"; + + // Upload the stream to Google Cloud Storage + await _storageClient.UploadObjectAsync(_bucketName, fileName, null, fileStream); + + return Ok("Excel file successfully saved to Google Cloud Storage."); + } + catch (Exception ex) + { + return BadRequest("Error saving file to Google Cloud Storage: " + ex.Message); + } +} +``` + +**Step 3:** Modify the index File in the Spreadsheet sample to using [`saveAsJson`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveasjson) method to serialize the spreadsheet and send it to the back-end + +```js + +const saveToGoogleCloud = () => { + spreadsheet.saveAsJson().then(json => { + const formData = new FormData(); + formData.append('FileName', loadedFileInfo.fileName); // e.g., "Report" + formData.append('saveType', loadedFileInfo.saveType); // e.g., "Xlsx" + formData.append('JSONData', JSON.stringify(json.jsonObject.Workbook)); + formData.append( + 'PdfLayoutSettings', + JSON.stringify({ FitSheetOnOnePage: false }) + ); + + fetch('https://localhost:portNumber/api/spreadsheet/SaveToGoogleCloud', { + method: 'POST', + body: formData + }) + .then(res => { + if (!res.ok) { + throw new Error(`Save failed with status ${res.status}`); + } + window.alert('Workbook saved successfully to Google Cloud Storage.'); + }) + .catch(err => window.alert('Error saving to server: ' + err)); + }); +}; +``` + +N> Note: The back-end requires the Google.Cloud.Storage.V1 NuGet package and a service-account key that has Storage Object Admin (or equivalent) permissions on the target bucket. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-google-drive.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-google-drive.md new file mode 100644 index 0000000000..21d834e31b --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/save-excel-file/to-google-drive.md @@ -0,0 +1,200 @@ +--- +layout: post +title: Save excel to Google Drive in EJ2 ASP.NET Core Spreadsheet control | Syncfusion +description: Learn about how to Save an Excel file to Google Drive from EJ2 ASP.NET Core Spreadsheet control of Syncfusion Essential JS 2. +platform: document-processing +control: Save file to Google Drive +documentation: ug +--- + +# Save file to Google Drive + +To save a file to Google Drive in a Spreadsheet Component, you can follow the steps below + +**Step 1:** Set up Google Drive API + +You must set up a project in the Google Developers Console and enable the Google Drive API. Obtain the necessary credentials to access the API. For more information, view the official [link](https://developers.google.com/workspace/drive/api/guides/enable-sdk). + +**Step 2:** Create a Simple Spreadsheet Sample in ASP.NET Core + +Start by following the steps provided in this [link](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. + +**Step 3:** Modify the `SpreadsheetController.cs` File in the Web Service Project + +* Create a web service project in .NET Core 3.0 or above. You can refer to this [link](https://www.syncfusion.com/blogs/post/host-spreadsheet-open-and-save-services) for instructions on how to create a web service project. + +* Open the `SpreadsheetController.cs` file in your web service project. + +* Import the required namespaces at the top of the file: + +```csharp + +using Google.Apis.Auth.OAuth2; +using Google.Apis.Drive.v3; +using Google.Apis.Services; +using Syncfusion.EJ2.Spreadsheet; + +``` + +* Add the following private fields and constructor parameters to the `SpreadsheetController` class, In the constructor, assign the values from the configuration to the corresponding fields. + +```csharp + +//variables for storing GDrive folderId, ApplicationName and Service-Accountkey credentials +public readonly string folderId; +public readonly string applicationName; +public readonly string credentialPath; + +//constructor for assigning credentials +public SpreadsheetController(IConfiguration configuration) +{ + folderId = configuration.GetValue("FolderId"); + credentialPath = configuration.GetValue("CredentialPath"); + applicationName = configuration.GetValue("ApplicationName"); +} + +``` + +* Create the `SaveExcelToGoogleDrive()` method to save the document to the Google Drive. + +```csharp + +[HttpPost] +[Route("SaveExcelToGoogleDrive")] +public async Task SaveExcelToGoogleDrive([FromForm] SaveSettings saveSettings) +{ + try + { + //Generate Excel file stream using Syncfusion + Stream generatedStream = Workbook.Save(saveSettings); + //Copy to MemoryStream to ensure full content is flushed and seekable + MemoryStream excelStream = new MemoryStream(); + // Copy generated stream to MemoryStream for upload + await generatedStream.CopyToAsync(excelStream); + excelStream.Position = 0; // Reset position for upload + // Prepare file name with extension based on SaveType + string fileName = saveSettings.FileName + "." + saveSettings.SaveType.ToString().ToLower(); + // Validate service account credential file + if (!System.IO.File.Exists(credentialPath)) + throw new FileNotFoundException($"Service account key file not found at {credentialPath}"); + //Authenticate using Service Account credentials + GoogleCredential credential; + // Load Google service account credentials + using (var streamKey = new FileStream(credentialPath, FileMode.Open, FileAccess.Read)) + { + credential = GoogleCredential.FromStream(streamKey) + .CreateScoped(DriveService.Scope.Drive); + } + //Initialize Google Drive API service + var service = new DriveService(new BaseClientService.Initializer() + // Initialize Google Drive API client + { + HttpClientInitializer = credential, + ApplicationName = applicationName, + }); + //Prepare file metadata + var fileMetadata = new Google.Apis.Drive.v3.Data.File() + { + Name = fileName + }; + //Check if file already exists in the specified folder + var listRequest = service.Files.List(); + listRequest.Q = $"name='{fileName}' and trashed=false"; + // Query Google Drive for Excel, CSV files in the specified folder + listRequest.Fields = "files(id)"; + var files = await listRequest.ExecuteAsync(); + // Reset stream position before upload (important for both update and create) + excelStream.Position = 0; + // Set MIME type dynamically based on SaveType + string mimeType = saveSettings.SaveType switch + { + SaveType.Xlsx => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + SaveType.Xls => "application/vnd.ms-excel", + SaveType.Csv => "text/csv", + }; + + if (files.Files.Any()) + { + // If File exists Update in the existing file + var updateRequest = service.Files.Update(fileMetadata, files.Files[0].Id, excelStream, mimeType); + updateRequest.Fields = "id"; + await updateRequest.UploadAsync(); + } + else + { + // If File does not exist, Create new file + var createRequest = service.Files.Create(fileMetadata, excelStream,mimeType); + createRequest.Fields = "id"; + await createRequest.UploadAsync(); + } + return Ok("Excel file successfully saved/updated in Google Drive."); + } + catch (Exception ex) + { + return BadRequest("Error saving file to Google Drive: " + ex.Message); + } +} + +``` + +* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration + +```json +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "CredentialPath": "path-to-your-service-account-key.json", + "FolderId": "your-google-drive-folder-id", + "ApplicationName": "YourAppName" +} +``` + +N> Replace the **credential path**, **folderId** and **application name** in json file with your actual Google drive folder ID , your name for your application and the path for the JSON file. + +**Step 4:** Modify the index file in the Spreadsheet sample to save the Spreadsheet as JSON data using the [`saveAsJson`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveasjson) method and send the saved JSON to the server via fetch call. + +```typescript +; + +// Save the current spreadsheet to Google Drive +const saveToGoogleDrive = () => { + // Convert spreadsheet data to JSON + spreadsheet.saveAsJson().then((json) => { + const formData = new FormData(); // Append required fields for backend API + formData.append("FileName", loadedFileInfo.fileName); // File name + formData.append("SaveType", loadedFileInfo.saveType); // Format type (Xlsx, Xls, Csv) + formData.append("JSONData", JSON.stringify(json.jsonObject.Workbook)); // Spreadsheet data + formData.append( + "PdfLayoutSettings", + JSON.stringify({ FitSheetOnOnePage: false }), + ); // PDF settings + // Make a POST request to the backend API to save the file to Google Drive. + // Replace the URL with your local or hosted endpoint URL. + fetch( + "https://localhost:your_port_number/api/spreadsheet/SaveExcelToGoogleDrive", + { + method: "POST", + body: formData, + }, + ) + .then((response) => { + if (!response.ok) throw new Error(`Save failed: ${response.status}`); + window.alert("Workbook saved successfully to Google Drive."); + }) + .catch((error) => { + window.alert("Error saving to Google Drive: " + error); + }); + }); +}; +``` + +N> The Google.Apis.Drive.v3 NuGet package must be installed in your application to use the previous code example. + +[View sample in GitHub](https://github.com/SyncfusionExamples/syncfusion-react-spreadsheet-google-drive-integration) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/scrolling.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/scrolling.md index 2c846110b7..d1ed6f56a4 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/scrolling.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/scrolling.md @@ -7,12 +7,11 @@ control: Scrolling documentation: ug --- - # Scrolling in ASP.NET Core Spreadsheet control Scrolling helps you to move quickly to different areas of the worksheet. It moves faster if we use horizontal and vertical scroll bars. Scrolling can be enabled by setting the [`allowScrolling`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowScrolling) as true. -N> By default, the `allowScrolling` property is true. +> By default, the `allowScrolling` property is true. You have the following options in Scrolling by using [`scrollSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ScrollSettings). @@ -21,13 +20,13 @@ You have the following options in Scrolling by using [`scrollSettings`](https:// ## Finite Scrolling -Finite scrolling supports two type of modes in scrolling. You can use the `isFinite` property in [`scrollSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ScrollSettings) to specify the mode of scrolling. +Finite scrolling supports two type of modes in scrolling. You can use the [`isFinite`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.SpreadsheetScrollSettings.html#Syncfusion_EJ2_Spreadsheet_SpreadsheetScrollSettings_IsFinite) property in [`scrollSettings`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ScrollSettings) to specify the mode of scrolling. -* Finite - This mode does not create a new row/column when the scrollbar reaches the end. This can be achieved by setting the `isFinite` property as `true`. +* Finite - This mode does not create a new row/column when the scrollbar reaches the end. This can be achieved by setting the [`isFinite`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.SpreadsheetScrollSettings.html#Syncfusion_EJ2_Spreadsheet_SpreadsheetScrollSettings_IsFinite) property as `true`. -* Infinite - This mode creates a new row/column when the scrollbar reaches the end. This can be achieved by setting the `isFinite`property as `false`. +* Infinite - This mode creates a new row/column when the scrollbar reaches the end. This can be achieved by setting the [`isFinite`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.SpreadsheetScrollSettings.html#Syncfusion_EJ2_Spreadsheet_SpreadsheetScrollSettings_IsFinite) property as `false`. -N> By Default, the `isFinite` property is `false`. +> By Default, the `isFinite` property is `false`. ## Virtual Scrolling @@ -35,7 +34,7 @@ N> By Default, the `isFinite` property is `false`. In virtual scrolling `enableVirtualization` is set to true means, it allows you to load the spreadsheet data while scrolling. -N> By Default, the `enableVirtualization` property is `true`. +> By Default, the `enableVirtualization` property is `true`. **User Interface**: @@ -60,3 +59,6 @@ The following code example shows the finite scrolling with defined rows and colu {% endhighlight %} {% endtabs %} +## Note + +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/searching.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/searching.md index 96ddb05baa..37c5b15f30 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/searching.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/searching.md @@ -7,54 +7,53 @@ control: Searching documentation: ug --- +# Searching in React Spreadsheet component -# Find and Replace in ASP.NET Core Spreadsheet control +Find and Replace helps you to search for target text and replace the founded text with alternative text within the sheet or workbook. You can use the [`allowFindAndReplace`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFindAndReplace) property to enable or disable Find and Replace functionality. -Find and Replace helps you to search for the target text and replace the found text with alternative text within the sheet or workbook. You can use the [`allowFindAndReplace`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowFindAndReplace) property to enable or disable the Find and Replace functionality. - -N> * The default value for `allowFindAndReplace` property is `true`. +> * The default value for `allowFindAndReplace` property is `true`. ## Find -Find feature is used to select the matched contents of a cell within the sheet or workbook. It is extremely useful when working with large set of data source. +Find is used to select the matched contents of a cell within sheet or workbook. It is extremely useful when working with large sets of data source. **User Interface**: Find can be done by any of the following ways: -* Select the Search icon in the Ribbon toolbar or use `Ctrl + F` key to open the Find dialog. -* Use find Next and find Previous buttons to search the given value in the workbook. -* Select the option button in Find dialog to open the Find and Replace dialog. Then, select the below properties for enhanced searching. +* Select the Search icon in the Ribbon toolbar or using `Ctrl + F` key to open the Find dialog. +* Using find Next and find Previous buttons to search the given value in workbook. +* Select the option button in Find dialog to open the Find and Replace dialog then select the below properties for enhanced searching. -N> * `Search within`: To search the target in a sheet (default) or in an entire workbook. -
* `Search by`: It enhance the search, either By Rows (default), or By Columns. -
* `Match case`: To find the matched value with case sensitive. -
* `Match exact cell contents`: To find the exact matched cell value with entire match cases. +> * `Search within`: To search the target in a sheet (default) or in an entire workbook. +> * `Search by`: It enhance the search, either By Rows (default), or By Columns. +> * `Match case`: To find the matched value with case sensitive. +> * `Match exact cell contents`: To find the exact matched cell value with entire match cases. -* Using `find()` method to perform find operation. +* Using [`find`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#find) method to perform find operation. ## Replace -Replace feature is used to change the find contents of a cell within sheet or workbook. Replace All is used to change all the matched contents of a cell within sheet or workbook. +Replace is used to change the find contents of a cell within sheet or workbook. Replace All is used to change all the matched contents of a cell within sheet or workbook. **User Interface**: Replace can be done by any of the following ways: -* Use `Ctrl + H` key to open the Find and Replace dialog. -* Use Replace button to change the found value in sheet or workbook. -* Using Replace All button, all the matched criteria can be replaced with find value based on sheet or workbook. -* Using `replace()` method to perform replace operation by passing the argument `args.replaceby` as `replace`. -* Using `replace()` method to perform replace all operation by passing the argument `args.replaceby` as `replaceall`. +* Using `Ctrl + H` key to open the Find and Replace dialog. +* Using Replace button to change the found value in sheet or workbook. +* Using ReplaceAll button to change all the found value's in sheet or workbook. +* Using [`replace`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#replace) method to perform replace operation by passing the argument `args.replaceby` as `replace`. +* Using [`replace`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#replace) method to perform replace all operation by passing the argument `args.replaceby` as `replaceall`. ## Go to -Go to feature is used to navigate to a specific cell address in the sheet or workbook. +Go to is used to navigate to a specific cell address in the sheet or workbook. **User Interface**: -* Use `Ctrl + G` key to open the Go To dialog. -* Use `goTo()` method to perform Go To operation. +* Using `Ctrl + G` key to open the Go To dialog. +* Using [`goTo`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#goto) method to perform Go To operation. In the following sample, searching can be done by following ways: @@ -72,8 +71,12 @@ In the following sample, searching can be done by following ways: {% endhighlight %} {% endtabs %} +## Limitations +* Undo/redo for Replace All is not supported in this feature. +* Replace All functionality is not restricted to selected range of cells. +* Find and Replace in Formulas, Notes not supported. -## Limitations +## Note -* Undo/redo for Replace All is not supported in this feature. \ No newline at end of file +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/deploy-spreadsheet-docker-to-azure-using-azure-cli.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/deploy-spreadsheet-docker-to-azure-using-azure-cli.md new file mode 100644 index 0000000000..1ca888caed --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/deploy-spreadsheet-docker-to-azure-using-azure-cli.md @@ -0,0 +1,91 @@ +--- +layout: post +title: Deploy Spreadsheet Server to Azure App Service using CLI | Syncfusion +description: Learn how to deploy the Syncfusion Spreadsheet Server Docker image to Azure App Service using Azure CLI. +control: How to deploy Spreadsheet Server Docker Image to Azure App Service using Azure CLI +platform: document-processing +documentation: ug +--- + +# Deploy Spreadsheet Docker to Azure App Service using Azure CLI + +## Prerequisites + +* `Docker` installed on your machine (Windows, macOS, or Linux). +* `Azure CLI` installed based on your operating system. [Download Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) +* An active [`Azure subscription`](https://azure.microsoft.com/en-gb) with App Services access. +* The [`Spreadsheet Server Docker image`](https://hub.docker.com/r/syncfusion/spreadsheet-server) available. + +## Deploy to Azure App Service using Azure CLI + +**Step 1:** Log in to Azure + +Open your terminal and sign in to Azure using the command below. This authenticates your CLI with Azure. + +```bash +az login +``` + +**Step 2:** Create a resource group + +Create a resource group with the following command in your preferred location. + +```bash +az group create --name < your-app-name> --location +``` + +**Step 3:** Create an app service plan + +Create a resource group with the following command in your preferred location. + +```bash +az appservice plan create --name --resource-group < your-resource-group> --sku S1 --is-linux +``` + +This creates an App Service plan in the standard pricing tier (S1) and ensures it runs on Linux containers with the --is-linux flag. + +**Step 4:** Create the docker-compose.yml file + +Define your container configuration in a docker-compose.yml file. This file specifies the container name, image, and environment variables for the Spreadsheet Server: + +```bash +version: '3.4' + +services: + spreadsheet-server: + image: syncfusion/spreadsheet-server + environment: + + # Provide your license key for activation + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY + ports: + - "6002:8080" + +``` + +Note: Replace YOUR_LICENSE_KEY with your valid Syncfusion license key. + +**Step 5:** Create a Docker compose app + +Deploy the containerized app to Azure App Service using the following command. + +```bash +az webapp create --resource-group --plan < your-app-service-plan> --name --multicontainer-config-type compose --multicontainer-config-file docker-compose.yml +``` + +This command creates a web app that runs your Spreadsheet Server Docker container using the configuration defined in the docker-compose.yml file. + +**Step 6:** Browse your app + +Once deployed, your app will be live at https://XXXXXXXXXX.azurewebsites.net. + +![azure cli](../images/azure-cli.png) + +**Step 7:** With your server running, verify that it supports import and export operations by testing the following endpoints: +``` +openUrl="https://XXXXXXXXXX.azurewebsites.net/api/spreadsheet/open" +saveUrl="https://XXXXXXXXXX.azurewebsites.net/api/spreadsheet/save +``` +Append the App Service running URL to the service URL in the client‑side Spreadsheet Editor component. For more information about how to get started with the Spreadsheet Editor component, refer to this [`getting started page`](../getting-started.md) + +For more information about the app container service, please look deeper into the [`Microsoft Azure App Service`](https://docs.microsoft.com/en-us/visualstudio/deployment/) for a production-ready setup. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/deploy-spreadsheet-server-to-aws-eks-using-docker.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/deploy-spreadsheet-server-to-aws-eks-using-docker.md new file mode 100644 index 0000000000..7b6eaa2547 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/deploy-spreadsheet-server-to-aws-eks-using-docker.md @@ -0,0 +1,141 @@ +--- +layout: post +title: Deploy Spreadsheet Docker to AWS EKS Cluster | Syncfusion +description: Learn how to deploy the Syncfusion Spreadsheet server Docker image to AWS EKS and connect it to the EJ2 ASP.NET Core Spreadsheet component. +control: How to deploy spreadsheet server to AWS EKS using Docker +platform: document-processing +documentation: ug +--- + +# How to deploy spreadsheet server to AWS EKS Cluster + +## Prerequisites + +* `AWS account` and [`AWS CLI`](https://aws.amazon.com/cli/) installed and configured. +* [`kubectl`](https://kubernetes.io/docs/tasks/tools/) installed and configured. +* Access to an existing EKS cluster, or you can create one via the AWS console or CLI. +* Docker installed if you plan to build and push a custom image. + +**Step 1:** Configure your environment +* Open a terminal and authenticate to AWS + +```bash + +aws configure # enter your Access Key, Secret Key, region, and output format (e.g., json) + +``` +* Update your kubectl context to point to the EKS cluster: + +```bash + +aws eks update-kubeconfig --region --name + +``` +* After updating the [`kubeconfig`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) with the EKS cluster, you can verify the node’s state. + +```bash + +kubectl get nodes # verify that your cluster nodes are ready + +``` + +**Step 2:** Create the Deployment +Create a file named spreadsheet-deployment.yaml defining a deployment for the Syncfusion® container. The container listens on port `8080`: + +```yaml + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: spreadsheet-server + labels: + app: spreadsheet-server +spec: + replicas: 1 # Increase to 2 or more for higher availability + selector: + matchLabels: + app: spreadsheet-server + template: + metadata: + labels: + app: spreadsheet-server + spec: + containers: + - name: spreadsheet-server + image: syncfusion/spreadsheet-server:latest + ports: + - containerPort: 8080 + env: + - name: SYNCFUSION_LICENSE_KEY + value: "YOUR_LICENSE_KEY" + +``` + +> If you build a custom image, push it to Docker Hub or AWS ECR and update `image:` field accordingly. + +**Step 3:** Expose the Service +Create a `spreadsheet-service.yaml` to define a Service of type `LoadBalancer` that forwards traffic to the container. Customize the external port (5000) as needed; the internal `targetPort` should remain 8080 because the container listens on that port. + +```yaml + +apiVersion: v1 +kind: Service +metadata: + name: spreadsheet-server-service +spec: + selector: + app: spreadsheet-server + type: LoadBalancer + ports: + - protocol: TCP + port: 5000 # External port exposed by the load balancer + targetPort: 8080 # Internal container port + +``` + +**Step 4:** Deploy to EKS +* Apply the manifests: + +```bash + +kubectl apply -f spreadsheet-deployment.yaml +kubectl apply -f spreadsheet-service.yaml + +``` + +* Use the kubectl get pods command to monitor pod status. To retrieve the external address, run: + +```bash + +kubectl get svc spreadsheet-server-service + +``` + +* Retrieve the external address from the Service output. Use `https://` only if the Load Balancer is configured with TLS (use ACM for certificates). + +**Step 5:** Configure the ASP.NET Core client + +Start by following the steps provided in this [link](../getting-started.md) to create a simple Spreadsheet sample in ASP.NET Core. This will give you a basic setup of the Spreadsheet component. Once the Service reports an external address (e.g., a1b2c3d4e5f6-1234567890.us-east-1.elb.amazonaws.com), update the [`openUrl`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_OpenUrl) and [`saveUrl`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SaveUrl) properties of your ASP.NET Core Spreadsheet component: + +```js + + + +``` + +> Use `https://` if your Load Balancer has TLS configured. + +**Step 6:** Scaling and customization +- `Scale replicas:` To handle a higher workload, you can scale your deployment by increasing the replicas count in your `spreadsheet-deployment.yaml` file and then run `kubectl apply -f spreadsheet-deployment.yaml` to apply the changes. Kubernetes will automatically manage the distribution of traffic across the pods. +- `Resource limits:` Define `resources.requests`, and `resources.limits` in the container spec to allocate CPU and memory appropriately. +- `Environment variables:` In addition to SYNCFUSION_LICENSE_KEY, you can set other configuration keys (e.g., culture) using the env: section in the deployment manifest without modifying the docker image. + +For more information on deploying Spreadsheet docker image in Amazon EKS kindly refer to this [`Blog`](https://www.syncfusion.com/blogs/post/spreadsheet-server-eks-deployment) + +## See Also +* [Docker Image Overview in ASP.NET Core Spreadsheet](./spreadsheet-server-docker-image-overview) +* [Publish Spreadsheet Server to Azure App Service using Visual Studio](./publish-spreadsheet-server-to-azure-using-visual-studio) +* [Deploy Spreadsheet Docker to Azure App Service using Azure CLI](./deploy-spreadsheet-docker-to-azure-using-azure-cli) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/publish-spreadsheet-server-to-azure-using-visual-studio.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/publish-spreadsheet-server-to-azure-using-visual-studio.md new file mode 100644 index 0000000000..1c50b61223 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/publish-spreadsheet-server-to-azure-using-visual-studio.md @@ -0,0 +1,57 @@ +--- +layout: post +title: Deploy Spreadsheet Server to Azure App Service via VS | Syncfusion +description: Learn how to publish the Syncfusion Spreadsheet Server Web API to Azure App Service using Visual Studio. +control: How to publish Spreadsheet Server in Azure App Service using Visual Studio +platform: document-processing +documentation: ug +--- + +# Publish Spreadsheet Server to Azure App Service using Visual Studio + + +## Prerequisites + +* `Visual Studio 2022` or later is installed. +* [`.NET 8.0 SDK`](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) or later installed. +* An active [`Azure subscription`](https://azure.microsoft.com/en-gb) with App Services access. +* The [`Spreadsheet Web API project`](https://github.com/SyncfusionExamples/EJ2-Spreadsheet-WebServices/tree/main/WebAPI) repository cloned locally. + +Make sure you build the project using the Build > Build Solution menu command before following the deployment steps. + +## Publish to Azure App Service + +**Step 1:** In Solution Explorer, right-click the project and click Publish (or use the Build > Publish menu item). + +![azure publish ](../images/azure_publish.png) + +**Step 2:** In the Pick a publish target dialog box, select Azure as deployment target. + +![azure target ](../images/azure_target.png) + +**Step 3:** After selecting Azure, choose Azure App Service under the target options. + +![azure app service](../images/azure_app_service.png) + +**Step 4:** Select Publish. The Create App Service dialog box appears. Sign in with your Azure account, if necessary, and then the default app service settings populate the fields. + +![azure credentials](../images/azure_credentials.png) + +**Step 5:** Select Create. Visual Studio deploys the app to your Azure App Service, and the web app loads in your browser with the app name at, +``` +http://.azurewebsites.net +``` + +![azure_published_window](../images/azure_published_window.png) + +**Step 6:** Once the deployment process is complete, The deployed API will be live at the following URL: +https://XXXXXXXXXX.azurewebsites.net + +**Step 7:** With your server running, verify that it supports import and export operations by testing the following endpoints: +``` +openUrl="https://XXXXXXXXXX.azurewebsites.net/api/spreadsheet/open" +saveUrl="https://XXXXXXXXXX.azurewebsites.net/api/spreadsheet/save +``` +Append the App Service running URL to the service URL in the client‑side Spreadsheet Editor component. For more information about how to get started with the Spreadsheet Editor component, refer to this [`getting started page`](../getting-started.md) + +For more information about the app container service, please look deeper into the [`Microsoft Azure App Service`](https://docs.microsoft.com/en-us/visualstudio/deployment/) for a production-ready setup. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/spreadsheet-server-docker-image-overview.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/spreadsheet-server-docker-image-overview.md new file mode 100644 index 0000000000..c96b8dc0a3 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/server-deployment/spreadsheet-server-docker-image-overview.md @@ -0,0 +1,101 @@ +--- +layout: post +title: Docker image deployment in React Spreadsheet component | Syncfusion +description: Learn here all about Docker image deployment in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. +platform: document-processing +control: Docker deployment +documentation: ug +--- + +# Docker Image Overview in React Spreadsheet + +The [**Syncfusion® Spreadsheet (also known as Excel Viewer)**](https://www.syncfusion.com/spreadsheet-editor-sdk/react-spreadsheet-editor) is a feature-rich control for organizing and analyzing data in a tabular format. It provides all the common Excel features, including data binding, selection, editing, formatting, resizing, sorting, filtering, importing, and exporting Excel documents. + +This Docker image is the pre-defined Docker container for Syncfusion's Spreadsheet back-end functionalities. This server-side Web API project targets ASP.NET Core 8.0. + +You can deploy it quickly to your infrastructure. If you want to add new functionality or customize any existing functionalities, create your own Docker file by referencing the existing [Spreadsheet Docker project](https://github.com/SyncfusionExamples/Spreadsheet-Server-Docker). + +The Spreadsheet is supported on the [JavaScript](https://www.syncfusion.com/javascript-ui-controls), [Angular](https://www.syncfusion.com/angular-ui-components), [React](https://www.syncfusion.com/react-ui-components), [Vue](https://www.syncfusion.com/vue-ui-components), [ASP.NET Core](https://www.syncfusion.com/aspnet-core-ui-controls), and [ASP.NET MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls) platforms. + +## Prerequisites + +Have [`Docker`](https://www.docker.com/products/container-runtime#/download) installed in your environment: + +* On Windows, install [`Docker for Windows`](https://hub.docker.com/editions/community/docker-ce-desktop-windows). +* On macOS, install [`Docker for Mac`](https://docs.docker.com/desktop/install/mac-install/). + +## How to deploy the Spreadsheet Docker Image + +**Step 1:** Pull the spreadsheet-server image from Docker Hub. + +```console +docker pull syncfusion/spreadsheet-server +``` + +**Step 2:** Create the `docker-compose.yml` file with the following code in your file system. + +```yaml +version: '3.4' + +services: + spreadsheet-server: + image: syncfusion/spreadsheet-server:latest + environment: + # Provide your license key for activation + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY + ports: + - "6002:8080" +``` + +**Note:** The Spreadsheet is a commercial product. It requires a valid [license key](https://help.syncfusion.com/common/essential-studio/licensing/licensing-faq/where-can-i-get-a-license-key) to use in a production environment. Please replace `YOUR_LICENSE_KEY` with the valid license key in the `docker-compose.yml` file. + +**Step 3:** In a terminal tab, navigate to the directory where you've placed the `docker-compose.yml` file and execute the following: + +```console +docker-compose up +``` + +Now the Spreadsheet server Docker instance runs on localhost with the provided port number `http://localhost:6002`. Open this link in a browser and navigate to the Spreadsheet Web API open and save service at `http://localhost:6002/api/spreadsheet/open` and `http://localhost:6002/api/spreadsheet/save`. + +**Step 4:** Append the URLs of the Docker instance running services to the [`openUrl`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#openurl) property as `http://localhost:6002/api/spreadsheet/open` and the [`saveUrl`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveurl) property as `http://localhost:6002/api/spreadsheet/save` in the client-side Spreadsheet component. For more information on how to get started with the Spreadsheet component, refer to this [`getting started page.`](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/getting-started) + +```js +import * as React from 'react'; +import { createRoot } from 'react-dom/client'; +import { SpreadsheetComponent } from '@syncfusion/ej2-react-spreadsheet'; + +function App() { + + return ( + // Initialize Spreadsheet component. + + ); +}; +export default App; + +const root = createRoot(document.getElementById('root')); +root.render(); +``` + +## How to configure different cultures using a Docker compose file + +By default, the Spreadsheet Docker container is generated in the `en_US` culture. You can configure different cultures using the `LC_ALL`, `LANGUAGE`, and `LANG` environment variables in the `docker-compose.yml` file. These environment variables are replaced in the Docker file to set the specified culture for the Spreadsheet server. + +```yaml +version: '3.4' + +services: + spreadsheet-server: + image: syncfusion/spreadsheet-server:latest + environment: + # Provide your license key for activation + SYNCFUSION_LICENSE_KEY: YOUR_LICENSE_KEY + # Specify the culture to configure for the Spreadsheet server + LC_ALL: de_DE.UTF-8 + LANGUAGE: de_DE.UTF-8 + LANG: de_DE.UTF-8 + ports: + - "6002:8080" +``` + +Please refer to these getting started pages to create a Spreadsheet in [`Javascript`](https://help.syncfusion.com/document-processing/excel/spreadsheet/javascript-es5/getting-started), [`Angular`](https://help.syncfusion.com/document-processing/excel/spreadsheet/angular/getting-started), [`Vue`](https://help.syncfusion.com/document-processing/excel/spreadsheet/vue/getting-started), [`ASP.NET Core`](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/getting-started-core), and [`ASP.NET MVC`](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-mvc/getting-started-mvc). \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/sort.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/sort.md index b548cb172f..41a61f824b 100644 --- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/sort.md +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/sort.md @@ -7,34 +7,31 @@ control: Sort documentation: ug --- - -# Sorting in ASP.NET Core Spreadsheet control +# Sort in React Spreadsheet component Sorting helps arranging the data to a specific order in a selected range of cells. You can use the [`allowSorting`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_AllowSorting) property to enable or disable sorting functionality. -N> * The default value for `allowSorting` property is `true`. +> * The default value for `allowSorting` property is `true`. By default, the `sort` module is injected internally into Spreadsheet to perform sorting. -## Sort by cell value - -In the active Spreadsheet, select a range of cells to sort by cell value. The range sort can be done by any of the following ways: -* Select the sort item in the Ribbon toolbar and choose the ascending or descending item. -* Right-click the sheet, select the sort item in the context menu and choose the ascending/descending item. -* Use the `sort()` method programmatically. +## Sort by Cell value -The cell values can be sorted in the following orders: -* Ascending -* Descending +In the active Spreadsheet, you can sort a selected range of cells by their values. Sorting can be done in following ways: -N> * Ascending is the default order for sorting. +* **Ribbon Toolbar** – Select the sort option under the Ribbon toolbar and choose ascending or descending. +* **Context Menu** – Right-click the sheet, select the sort option, and choose ascending or descending. +* **Programmatically** – Use the [`sort`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#sort) method. -The `sort()` method with empty arguments will sort the selected range by active cell’s column as sort column in ascending order. +The cell values can be sorted in the following orders: +* **Ascending** – Default order for sorting. +* **Descending** – Reverse order. +When the `sort` method is called with empty arguments, the selected range is sorted by the active cell’s column in ascending order. -N> * The `beforeSort` event will be triggered before sorting the specified range. -
* The `sortComplete` event will be triggered after the sort action is completed successfully. +> * The [`beforeSort`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_BeforeSort) event will be triggered before sorting the specified range. +> * The [`sortComplete`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SortComplete) event will be triggered after the sort action is completed successfully. -The following code example shows `sort` functionality in the Spreadsheet control. +The following code example demonstrates the `sort` functionality in the Spreadsheet control. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -45,40 +42,38 @@ The following code example shows `sort` functionality in the Spreadsheet control {% endhighlight %} {% endtabs %} - - ## Data contains header -You can specify whether the selected range of cells contains header. To specify, you need to set the `containsHeader` property to `true` and pass it as `sortOption` arguments of the sort() method. +You can specify whether the selected range of cells contains header. To specify, you need to set the [`containsHeader`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#containsheader) property to `true` and pass it as `sortOption` arguments of the sort method. -N> * If the `containsHeader` property is not set and active cell column’s first cell value type is differed from the second cell value type, the first row data in the range are marked as column headers. +> * If the `containsHeader` property is not set and active cell column’s first cell value type is differed from the second cell value type, the first row data in the range are marked as column headers. You can also enable or disable this property using `beforeSort` event arguments, -```javascript +```ts - function beforeSort(args) { + const beforeSort = (args: BeforeSortEventArgs): void => { args.sortOptions.containsHeader = true; } + ``` In the custom sort dialog, the `Data contains header` checkbox is checked on load. Thus, the default value for `containsHeader` is `true` in custom sort dialog. -## Case sensitive sort - -The default sort functionality of Spreadsheet is a case insensitive sorting. When you want to perform sorting with case sensitive, you need to set the `caseSensitive` property to `true` and pass it as `sortOption` arguments of the sort() method. +## Case Sensitive sort -Case sensitive sorting is applicable only for cells with alphabets. In ascending order sorting with case sensitive enabled, the cells with lower case text will be placed above the cells with upper case text. +By default, sorting in the Spreadsheet is **case insensitive**. To perform sorting with case sensitivity, set the [`caseSensitive`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#casesensitive) property to `true` and pass it as part of the `sortOption` arguments in the `sort` method. -N> * The default value for the `caseSensitive` property is `false`. +* Case sensitive sorting applies only to cells containing alphabets. +* In ascending order with case sensitivity enabled, cells with lowercase text appear above cells with uppercase text. +> * The default value for the `caseSensitive` property is `false`. You can also enable or disable this property using `beforeSort` event arguments, -```javascript - - function beforeSort (args) { +```ts + const beforeSort = (args: BeforeSortEventArgs): void => { args.sortOptions.caseSensitive = true; - } + } ``` @@ -88,27 +83,32 @@ In the custom sort dialog, the `Case sensitive` checkbox is unchecked on load as When you want to perform sorting on multiple columns, it can be done by any of the following ways: * Select the `Custom sort…` menu item from the Ribbon toolbar item or context menu item. -* Use the `sort()` method programmatically by providing sort criteria. +* Use the `sort` method programmatically by providing sort criteria. -N> * The current sorting functionality supports sorting based on cell values only. +> * The current sorting functionality supports sorting based on cell values only. -### Custom sort dialog +### Custom Sort Dialog -The custom sort dialog helps sorting multiple columns in the selected range by utilizing the rich UI. This dialog will be appeared while choosing the `Custom sort…` from the Ribbon item or context menu item. By default, sort criteria with the first column name from the selected range will be appeared in the dialog on initial load and it cannot be removed. +The custom sort dialog allows sorting multiple columns in a selected range using a rich UI. This dialog appears when you choose `Custom sort…` from the Ribbon or context menu. + +* By default, the dialog shows sort criteria with the first column name from the selected range. This initial criterion cannot be removed. +* You can add more criteria using the `Add Column` button at the bottom of the dialog. Each criterion can have its own sort order. +* Newly added criteria can be removed using the `delete` icon next to each item. -You can add multiple criteria using the `Add Column` button at the bottom of the dialog. Thus, multiple columns can be specified with different sort order. The newly added sort criteria items can be removed using the `delete` icons at the end of each items. +* **Data contains header** – Refer to the [Data contains header](./sort#data-contains-header) topic for details about the checkbox. +* **Case sensitive** – Refer to the [Case sensitive sort](./sort#case-sensitive-sort) topic for details about the checkbox. -You can refer to the [`Data contains header`](https://ej2.syncfusion.com/aspnetmvc/documentation/spreadsheet/sort#data-contains-header) topic to learn more about `Data contains header` checkbox. To learn more about `Case sensitive` checkbox, you can refer to [`Case sensitive sort`](https://ej2.syncfusion.com/aspnetmvc/documentation/spreadsheet/sort#case-sensitive-sort) topic. +This dialog makes it easy to sort complex datasets by multiple columns with clear, customizable options. ### Passing sort criteria manually -The multi-column sorting can also be performed manually by passing sort options to the `sort()` method programmatically. The `sortOption` have the following arguments: -* `sortDescriptors` – Sort criteria collection that holds the collection of field name, sort order, and `sortComparer`. +The multi-column sorting can also be performed manually by passing sort options to the `sort` method programmatically. The `sortOption` have the following arguments: +* [`sortDescriptors`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#sortdescriptors) – Sort criteria collection that holds the collection of field name, sort order, and [`sortComparer`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#sortcomparer). * `containsHeader` – Boolean argument that specifies whether the range has headers in it. * `caseSensitive` – Boolean argument that specifies whether the range needs to consider case. -N> * All the arguments are optional. -
* When a `sortDescriptor` is specified without field, the field of the first `sortDescriptor` from the collection will be assigned from active cell’s column name and others will be ignored. Hence, it will act as single column sorting. +> * All the arguments are optional. +> * When a `sortDescriptor` is specified without field, the field of the first `sortDescriptor` from the collection will be assigned from active cell’s column name and others will be ignored. Hence, it will act as single column sorting. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -119,23 +119,25 @@ N> * All the arguments are optional. {% endhighlight %} {% endtabs %} - - ## Custom sort comparer -The `sortDescriptor` holds the `sortComparer` property, which is a function and it is used to customize the sort comparer for specific sort criteria. Each `sortDescriptor` can be customized using the custom sort comparer function. +The [`sortDescriptor`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#sortdescriptor) holds the [`sortComparer`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#sortcomparer) property, which is a function and it is used to customize the sort comparer for specific sort criteria. Each `sortDescriptor` can be customized using the custom sort comparer function. By customizing sort comparer, you can define the sort action as desired. -N> * The `sortComparer` is an optional property of `sortDescriptor`. +> * The `sortComparer` is an optional property of `sortDescriptor`. -For custom sort comparer example, refer to the [`Sort a range by custom list`] below section. +For custom sort comparer example, refer to the [`Sort a range by custom list`] below. ### Sort a range by custom list - You can also define the sorting of cell values based on your own customized personal list. In this article, custom list is achieved using `custom sort comparer`. -In the following demo, the `Trustworthiness` column is sorted based on the custom lists `Perfect`, `Sufficient`, and `Insufficient`. +For example, in the demo below, the `Trustworthiness`column is sorted according to the custom list values: +* `Perfect` +* `Sufficient` +* `Insufficient` + +This approach lets you control the order of sorting beyond the default ascending or descending options, making it easier to arrange data according to personalized or domain-specific criteria. {% tabs %} {% highlight cshtml tabtitle="CSHTML" %} @@ -158,9 +160,14 @@ The following errors have been handled for sorting, ## Limitations * Sorting is not supported with formula contained cells. +* Sort by color is not supported. + +## Note + +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. ## See Also -* [Hyperlink](./link) -* [Filtering](./filter) -* [Undo Redo](./undo-redo) \ No newline at end of file +* [Hyperlink](../spreadsheet/link) +* [Filtering](../spreadsheet/filter) +* [Undo Redo](../spreadsheet/undo-redo) diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/custom-cell-templates.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/custom-cell-templates.md new file mode 100644 index 0000000000..50d154815c --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/custom-cell-templates.md @@ -0,0 +1,27 @@ +--- +layout: post +title: Custom templates in react spreadsheet component | syncfusion +description: Learn here how to add custom templates to show icons or controls in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Create Custom Cell Templates + +The Syncfusion React Spreadsheet component lets you display custom templates inside cells.You can insert icons, labels, buttons, or any custom templates. This is useful when you need custom functionality inside cells. You can add templates to cells 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/react/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. + +The following code sample shows how to create custom cell templates. + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/dynamic-cell-template-cs1/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/dynamic-cell-template-cs1/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/react/dynamic-cell-template-cs1" %} \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/customize-context-menu.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/customize-context-menu.md new file mode 100644 index 0000000000..4cf4de9993 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/customize-context-menu.md @@ -0,0 +1,69 @@ +--- +layout: post +title: Context menu item in React Spreadsheet component | Syncfusion +description: Learn here how to customize the context menu by adding or hiding items in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Customize Context Menu + +The Syncfusion React Spreadsheet component provides an easy way to customize the context menu. You can add custom menu items, hide default items, or change what happens when a user selects a menu option. This giving access to useful actions. You can perform the following context menu customization options in the spreadsheet + +* Add Context Menu Items +* Remove Context Menu Items +* Enable/Disable Context Menu Items + +## Add Context Menu Items + +You can add custom items to the context menu using the [`addContextMenuItems`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#addcontextmenuitems) event. Since multiple context menus are available, to identify which context menu opened, you can use the[contextmenuBeforeOpen](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#contextmenubeforeopen) event and access the menu's class name from its event arguments. For more information, refer to this guide: https://help.syncfusion.com/document-processing/excel/spreadsheet/react/how-to/identify-the-context-menu-opened#identify-the-context-menu-opened-in-react-spreadsheet-component + +You can use the [contextmenuItemSelect](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#contextmenuitemselect) event to handle when a context menu item is chosen. This event is triggered when the user selects a menu item and provides the selected item's details and the target element in its event arguments; handle it to prevent default function or adding custom functions to the context menu item. + +The following code sample shows how to handle custom actions in the `contextmenuItemSelect` event. + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/context-menu-cs1/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/context-menu-cs1/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + + {% previewsample "/document-processing/code-snippet/spreadsheet/react/context-menu-cs1" %} + +## Remove Context Menu Items + +You can remove the items in context menu using the [`removeContextMenuItems`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#removecontextmenuitems) in `contextmenuBeforeOpen` event + +The following code sample removes the Insert Column item from the row/column header context menu. + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/context-menu-cs2/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/context-menu-cs2/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + + {% previewsample "/document-processing/code-snippet/spreadsheet/react/context-menu-cs2" %} + +## Enable/Disable Context Menu Items + +You can enable/disable the items in context menu using the [`enableContextMenuItems`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#enablecontextmenuitems) in `contextmenuBeforeOpen` event + +The following code sample disables the Rename item in the pager context menu. + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/context-menu-cs3/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/context-menu-cs3/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + + {% previewsample "/document-processing/code-snippet/spreadsheet/react/context-menu-cs3" %} \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/customize-filemenu.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/customize-filemenu.md new file mode 100644 index 0000000000..e4d800e95c --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/customize-filemenu.md @@ -0,0 +1,71 @@ +--- +layout: post +title: Custom file menu in React Spreadsheet component | Syncfusion +description: Learn here how to customize the File menu in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Customize File Menu in React Spreadsheet + +The Syncfusion React Spreadsheet component lets you customize the File menu. You can hide file menu items, disable items, and add your own custom items with click actions. This helps you build a clear, task‑focused menu. You can perform the following file menu customization options in the spreadsheet + +* Add File Menu Items +* Hide/Show File Menu Items +* Enable/Disable File Menu Items + +## Add Custom File Menu Items + +In the Syncfusion React Spreadsheet component, you can add custom items to the File menu to include your custom actions. These items are inserted before or after a chosen built‑in File menu item by using the [addFileMenuItems](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#addfilemenuitems) method. + +A custom item can have its own text, icon, and sub‑items, and its click action is handled in the [fileMenuItemSelect](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#filemenuitemselect) event, where the selected item is identified and the defined functionality is executed. + +The following code sample shows how to add custom items in file menu: + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/custom-filemenu-cs1/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/custom-filemenu-cs1/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/react/custom-filemenu-cs1" %} + +## Show or Hide File Menu Items + +You can show or hide File menu items using the [hideFileMenuItems](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#hidefilemenuitems) method in [fileMenuBeforeOpen](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#filemenubeforeopen) event. + +The following code sample shows how to hide or show file menu items: + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/show-or-hide-filemenu-cs1/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/show-or-hide-filemenu-cs1/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/react/show-or-hide-filemenu-cs1" %} + +## Enable or Disable File Menu Items + +You can use the [enableFileMenuItems](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#enablefilemenuitems) method in the [fileMenuBeforeOpen](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#filemenubeforeopen) event to enable or disable File menu items. If there are duplicate item texts, target the item by its unique ID and set the third parameter `isUniqueId` to `true`. + +The following code sample shows how to enable or disable file menu items + +{% tabs %} +{% highlight js tabtitle="app.jsx" %} +{% include code-snippet/spreadsheet/react/enable-or-disable-filemenu-cs1/app/app.jsx %} +{% endhighlight %} +{% highlight ts tabtitle="app.tsx" %} +{% include code-snippet/spreadsheet/react/enable-or-disable-filemenu-cs1/app/app.tsx %} +{% endhighlight %} +{% endtabs %} + +{% previewsample "/document-processing/code-snippet/spreadsheet/react/enable-or-disable-filemenu-cs1" %} + +You can also use [fileMenuBeforeClose](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#filemenubeforeclose) when you need to run logic just before the File menu closes. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/theming-and-styling.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/theming-and-styling.md new file mode 100644 index 0000000000..a28434f107 --- /dev/null +++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/user-interface-customization/theming-and-styling.md @@ -0,0 +1,259 @@ +--- +layout: post +title: Theme and style in React Spreadsheet component | Syncfusion +description: Learn here how to use built‑in themes and apply custom styles in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. +control: Spreadsheet +platform: document-processing +documentation: ug +--- + +# Built in Themes in React Spreadsheet + +Our Syncfusion React Spreadsheet component provides a comprehensive set of built-in themes to deliver a consistent, modern, and visually appealing appearance across applications. Applying a theme loads the corresponding CSS file and updates the component’s appearance throughout the UI. + +For more information about the built-in themes in Syncfusion, please refer to the [documentation](https://ej2.syncfusion.com/react/documentation/appearance/theme). + +## Customizing Theme Color + +The Syncfusion React Spreadsheet component supports many themes and lets you apply custom styles. You can customize theme colors using Theme Studio. Theme Studio lets you pick a theme, modify colors, and download a ready‑to‑use CSS file for your project. + +For more information on customizing the theme color via theme studio, please refer this [documentation](https://ej2.syncfusion.com/react/documentation/appearance/theme-studio) + +## CSS Customization + +To modify the Spreadsheet appearance, you need to override the default CSS of the spreadsheet. Please find the CSS structure that can be used to modify the Spreadsheet appearance. + +## Customizing the Spreadsheet + +Use the below CSS to customize the Spreadsheet root element. + +``` + +.e-spreadsheet { + font-family: cursive; +} + +``` + +## Header + +### Customizing the Spreadsheet Ribbon + +Use the below CSS to customize the Spreadsheet Ribbon. + +``` + +.e-spreadsheet .e-ribbon { + background-color: #808080; +} + +``` + +### Customizing the Spreadsheet formula bar panel + +You can customize the Spreadsheet formula bar panel by using this CSS. + +``` + +.e-spreadsheet .e-formula-bar-panel { + border: none; +} + +``` + +### Customizing the Spreadsheet formula bar text + +You can customize the Spreadsheet formula bar text by using this CSS. + +``` + +.e-spreadsheet .e-formula-bar-panel .e-formula-bar { + font-weight: bold; +} + +``` + +## Sheet + +### Customizing the Spreadsheet sheet element + +Using this CSS, you can customize the Spreadsheet sheet element. + +``` + +.e-spreadsheet .e-sheet-panel .e-sheet { + border-color: #000000; +} + +``` + +### Customizing the Spreadsheet sheet header + +Use the below CSS to customize the Spreadsheet sheet header. + +``` + +.e-spreadsheet .e-sheet-panel .e-sheet .e-header-panel { + font-style: oblique; +} + +``` + +### Customizing the Spreadsheet row header + +Use the below CSS to customize the Spreadsheet row header. + +``` +.e-spreadsheet .e-row-header .e-header-cell { + color: #0000FF !important; +} + +``` + +### Customizing the Spreadsheet column header + +Use the below CSS to customize the Spreadsheet column header. + +``` +.e-spreadsheet .e-column-header .e-header-cell { + color: #0000FF !important; +} + +``` + +### Customizing the Spreadsheet selection element + +Customize the Spreadsheet selection element. + +``` + +.e-spreadsheet .e-selection { + border-color: #0000FF; +} + +``` + +### Customizing the Spreadsheet active cell element + +Customize the Spreadsheet active cell element. + +``` + +.e-spreadsheet .e-active-cell { + border-color: #0000FF; +} + +``` + +### Customizing the Spreadsheet cell element + +Using this CSS, you can customize the Spreadsheet cell element. + +``` + +.e-spreadsheet .e-cell { + background-color: #0078d7 !important; +} + +``` + +## Ribbon Items + +### Customizing the Spreadsheet sorting icon + +Use the below CSS to customize the Spreadsheet sorting icon in the Spreadsheet ribbon. You can use the available Syncfusion® [icons](https://ej2.syncfusion.com/documentation/appearance/icons#material) based on your theme. + +``` + +.e-spreadsheet .e-sort-filter-icon:before { + background-color: #deecf9; + content: '\e306'; +} + +``` + +### Customizing the filter dialog content + +Use the below CSS to customize the Spreadsheet filter dialog content element. + +``` + +.e-spreadsheet .e-filter-popup .e-dlg-content { + background-color: #deecf9; +} + +``` + +### Customizing the filter dialog footer + +Spreadsheet filter dialog footer element can be customized by using the below CSS. + +``` + +.e-spreadsheet .e-filter-popup .e-footer-content { + background-color: #ccffff; +} + +``` + +### Customizing the filter dialog input element + +Use the below CSS to customize the Spreadsheet filter dialog input element. + +``` + +.e-spreadsheet .e-filter-popup .e-input-group input.e-input{ + font-family: cursive; +} + +``` + +### Customizing the filter dialog button element + +Use the below CSS to customize the Spreadsheet filter dialog button element. + +``` + +.e-spreadsheet .e-filter-popup .e-btn{ + font-family: cursive; +} + +``` + +### Customizing the Excel filter dialog number filters element + +Spreadsheet Excel filter dialog number filters element can be customized by using the below CSS. + +``` + +.e-spreadsheet .e-filter-popup .e-contextmenu-wrapper ul{ + background-color: #deecf9; +} + +``` + +## Footer + +### Customizing the Spreadsheet sheet tab panel + +Spreadsheet sheet tab panel can be customized by using the below CSS. + +``` + +.e-spreadsheet .e-sheet-tab-panel { + background: #08fbfb; +} + +``` + +### Customizing the Spreadsheet sheet tab + +Spreadsheet sheet tab element can be customized by using the below CSS. + +``` + +.e-spreadsheet .e-sheet-tab-panel .e-tab-header .e-toolbar-item.e-active .e-tab-wrap .e-tab-text { + font-weight: bold; +} + +``` \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/React/formulas.md b/Document-Processing/Excel/Spreadsheet/React/formulas.md index 7d30bc602e..cf2f0529b4 100644 --- a/Document-Processing/Excel/Spreadsheet/React/formulas.md +++ b/Document-Processing/Excel/Spreadsheet/React/formulas.md @@ -1,13 +1,13 @@ ---- layout: post -title: Formulas in React Spreadsheet component | Syncfusion -description: Learn here all about Formulas in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. -control: Formulas +title: Formulas in EJ2 ASP.NET Core Syncfusion Spreadsheet Component +description: Learn here all about Formulas in Syncfusion EJ2 ASP.NET CORE Spreadsheet component of Syncfusion Essential JS 2 and more. platform: document-processing +control: Formulas documentation: ug --- -# Formulas in React Spreadsheet component + +# Formulas in ASP.NET Core Spreadsheet control Formulas are used to perform calculations on data in a worksheet. You can refer the cell reference from same sheet or from different sheets. @@ -15,10 +15,10 @@ Formulas are used to perform calculations on data in a worksheet. You can refer You can set a formula for a cell in the following ways, -* Using the [formula](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/cell#formula) property from `cell`, you can set the formula or expression to each cell at initial load. +* Using the [formula](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Cell.html#Syncfusion_EJ2_Spreadsheet_Cell_Formula) property from `cell`, you can set the formula or expression to each cell at initial load. * Set the formula or expression through data binding. * You can set formula for a cell by [`editing`](./editing). -* Using the [`updateCell`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#updatecell) method, you can set or update the cell formula. +* Using the [`updateCell`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#updatecell) method, you can set or update the cell formula. ## Culture-Specific Formula Separators @@ -26,109 +26,74 @@ In earlier versions, even though culture-based Excel files could be imported int > Before importing culture-based Excel files, make sure the Spreadsheet component is rendered with the matching culture. Also, start the import/export services with the same culture to ensure compatibility. -When loading spreadsheet data with culture-based formula argument separators using cell data binding, local/remote data, or JSON, ensure to set the [listSeparator](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#listseparator) property value as the culture-based list separator from your end. Additionally, note that when importing an Excel file, the [listSeparator](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#listseparator) property will be updated based on the culture of the launched import/export service. +When loading spreadsheet data with culture-based formula argument separators using cell data binding, local/remote data, or JSON, ensure to set the [listSeparator](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ListSeparator) property value as the culture-based list separator from your end. Additionally, note that when importing an Excel file, the [listSeparator](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ListSeparator) property will be updated based on the culture of the launched import/export service. In the example below, the Spreadsheet component is rendered with the **German culture[de]**. The example also shows how to set the culture-based argument separator and use culture-based formatted numeric values as arguments in formulas. {% tabs %} -{% highlight js tabtitle="App.jsx" %} -{% include code-snippet/spreadsheet/react/formula-cs3/app/App.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="App.tsx" %} -{% include code-snippet/spreadsheet/react/formula-cs3/app/App.tsx %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/formula-cs3/tagHelper %} {% endhighlight %} -{% highlight js tabtitle="locale.json" %} -{% include code-snippet/spreadsheet/react/formula-cs3/app/locale.json %} -{% endhighlight %} -{% highlight js tabtitle="datasource.jsx" %} -{% include code-snippet/spreadsheet/react/formula-cs3/app/datasource.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="datasource.tsx" %} -{% include code-snippet/spreadsheet/react/formula-cs3/app/datasource.tsx %} +{% highlight c# tabtitle="FormulaController.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/formula-cs3/formulaController.cs %} {% endhighlight %} {% endtabs %} -{% previewsample "/document-processing/code-snippet/spreadsheet/react/formula-cs3" %} - ## Create User Defined Functions / Custom Functions -The Spreadsheet includes a set of built-in formulas. For convenience, you can find the list of supported formulas [here](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/formulas#supported-formulas). +The Spreadsheet includes a set of built-in formulas. For convenience, you can find the list of supported formulas [here](https://help.syncfusion.com/document-processing/excel/spreadsheet/asp-net-core/formulas#supported-formulas). -You can also define and use formulas that are not supported by default, known as **user defined/custom formulas**, by using the [addCustomFunction](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#addcustomfunction) function. Keep in mind that a user defined/custom formula should return only a single value. If the formula returns an array, updating adjacent cell values will take more time and may affect performance. +You can also define and use formulas that are not supported by default, known as **user defined/custom formulas**, by using the [addCustomFunction](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#addcustomfunction) function. Keep in mind that a user defined/custom formula should return only a single value. If the formula returns an array, updating adjacent cell values will take more time and may affect performance. The following code example shows how to use an unsupported formula in the Spreadsheet. {% tabs %} -{% highlight js tabtitle="app.jsx" %} -{% include code-snippet/spreadsheet/react/formula-cs1/app/app.jsx %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/formula/tagHelper %} {% endhighlight %} -{% highlight ts tabtitle="app.tsx" %} -{% include code-snippet/spreadsheet/react/formula-cs1/app/app.tsx %} -{% endhighlight %} -{% highlight js tabtitle="datasource.jsx" %} -{% include code-snippet/spreadsheet/react/formula-cs1/app/datasource.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="datasource.tsx" %} -{% include code-snippet/spreadsheet/react/formula-cs1/app/datasource.tsx %} +{% highlight c# tabtitle="FormulaController.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/formula/formulaController.cs %} {% endhighlight %} {% endtabs %} - {% previewsample "/document-processing/code-snippet/spreadsheet/react/formula-cs1" %} - -To directly compute a formula or expression, use the [computeExpression](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#computeexpression) method. This method will work for both built-in and used-defined/custom formula. +To directly compute a formula or expression, use the [computeExpression](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#computeexpression) method. This method will work for both built-in and used-defined/custom formula. The following code example shows how to use `computeExpression` method in the spreadsheet. {% tabs %} -{% highlight js tabtitle="app.jsx" %} -{% include code-snippet/spreadsheet/react/formula-cs2/app/app.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="app.tsx" %} -{% include code-snippet/spreadsheet/react/formula-cs2/app/app.tsx %} -{% endhighlight %} -{% highlight js tabtitle="datasource.jsx" %} -{% include code-snippet/spreadsheet/react/formula-cs2/app/datasource.jsx %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/formula-cs2/tagHelper %} {% endhighlight %} -{% highlight ts tabtitle="datasource.tsx" %} -{% include code-snippet/spreadsheet/react/formula-cs2/app/datasource.tsx %} +{% highlight c# tabtitle="FormulaController.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/formula-cs2/formulaController.cs %} {% endhighlight %} {% endtabs %} -{% previewsample "/document-processing/code-snippet/spreadsheet/react/formula-cs2" %} - ## Formula Bar -The formula bar is used to enter or edit cell data more easily. By default, the formula bar is enabled in the spreadsheet. Use the [`showFormulaBar`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#showformulabar) property to enable or disable the formula bar. +The formula bar is used to enter or edit cell data more easily. By default, the formula bar is enabled in the spreadsheet. Use the [`showFormulaBar`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_ShowFormulaBar) property to enable or disable the formula bar. ## Named Ranges You can assign a meaningful name to a cell range and then use that name in formulas for calculation. This makes formulas easier to read, understand, and maintain. Named ranges can be added to the Spreadsheet in several ways: -* Use the [`definedNames`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#definednames) collection to add multiple named ranges during the initial load. -* Use the [`addDefinedName`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#adddefinedname) method to add a named range dynamically at runtime. -* Remove a named range dynamically using the [`removeDefinedName`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#removedefinedname) method. +* Use the [`definedNames`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_DefinedNames) collection to add multiple named ranges during the initial load. +* Use the [`addDefinedName`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#adddefinedname) method to add a named range dynamically at runtime. +* Remove a named range dynamically using the [`removeDefinedName`](https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#removedefinedname) method. * Select a range of cells and enter a name for the selected range directly in the **Name Box**. The following code example demonstrates how named ranges can be defined and used in formulas within the Spreadsheet. {% tabs %} -{% highlight js tabtitle="app.jsx" %} -{% include code-snippet/spreadsheet/react/defined-name-cs1/app/app.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="app.tsx" %} -{% include code-snippet/spreadsheet/react/defined-name-cs1/app/app.tsx %} -{% endhighlight %} -{% highlight js tabtitle="datasource.jsx" %} -{% include code-snippet/spreadsheet/react/defined-name-cs1/app/datasource.jsx %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/defined-names/tagHelper %} {% endhighlight %} -{% highlight ts tabtitle="datasource.tsx" %} -{% include code-snippet/spreadsheet/react/defined-name-cs1/app/datasource.tsx %} +{% highlight c# tabtitle="DefinedNameController.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/defined-names/definedNameController.cs %} {% endhighlight %} {% endtabs %} - {% previewsample "/document-processing/code-snippet/spreadsheet/react/defined-name-cs1" %} - ## Calculation Mode The Spreadsheet provides a **Calculation Mode** feature similar to the calculation options in online Excel. This feature lets you control when and how formulas are recalculated in the spreadsheet. The available modes are: @@ -136,7 +101,7 @@ The Spreadsheet provides a **Calculation Mode** feature similar to the calculati * **Automatic**: Formulas recalculate instantly whenever a change is made in dependent cells. * **Manual**: Formulas recalculate only when explicitly triggered by the user using options like **Calculate Sheet** or **Calculate Workbook**. -You can configure the calculation mode using the [`calculationMode`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#calculationmode) property of the Spreadsheet. These modes give flexibility to balance real-time updates with performance optimization. +You can configure the calculation mode using the [`calculationMode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CalculationMode) property of the Spreadsheet. These modes give flexibility to balance real-time updates with performance optimization. ### Automatic Mode @@ -144,27 +109,19 @@ In **Automatic Mode**, formulas are recalculated immediately whenever a dependen For example, if cell `C1` contains the formula `=A1+B1`, any change in `A1` or `B1` will instantly update the value in `C1`. No manual action is required. -You can enable this mode by setting the [`calculationMode`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet#calculationmode) property to `Automatic`. +You can enable this mode by setting the [`calculationMode`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_CalculationMode) property to `Automatic`. The following code example demonstrates how to set the Automatic calculation mode in a Spreadsheet. {% tabs %} -{% highlight js tabtitle="app.jsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs1/app/app.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="app.tsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs1/app/app.tsx %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/calculation-cs1/tagHelper %} {% endhighlight %} -{% highlight js tabtitle="datasource.jsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs1/app/datasource.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="datasource.tsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs1/app/datasource.tsx %} +{% highlight c# tabtitle="CalculationModeController.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/calculation-cs1/calculationModeController.cs %} {% endhighlight %} {% endtabs %} - {% previewsample "/document-processing/code-snippet/spreadsheet/react/calculation-cs1" %} - ### Manual Mode In **Manual Mode**, formulas are not recalculated automatically when cell values change. Instead, recalculation must be triggered explicitly. This mode is useful when performance optimization is important, such as working with large datasets or formulas that require heavy computation. @@ -178,22 +135,14 @@ The Spreadsheet provides two manual recalculation options: The following code example demonstrates how to set the Manual calculation mode in a Spreadsheet. {% tabs %} -{% highlight js tabtitle="app.jsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs2/app/app.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="app.tsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs2/app/app.tsx %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/spreadsheet/asp-net-core/calculation-cs2/tagHelper %} {% endhighlight %} -{% highlight js tabtitle="datasource.jsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs2/app/datasource.jsx %} -{% endhighlight %} -{% highlight ts tabtitle="datasource.tsx" %} -{% include code-snippet/spreadsheet/react/calculation-cs2/app/datasource.tsx %} +{% highlight c# tabtitle="CalculationModeController.cs" %} +{% include code-snippet/spreadsheet/asp-net-core/calculation-cs2/calculationModeController.cs %} {% endhighlight %} {% endtabs %} - {% previewsample "/document-processing/code-snippet/spreadsheet/react/calculation-cs2" %} - ## Supported Formulas The Spreadsheet component supports a comprehensive set of built-in formulas organized by category. Each formula can be used for calculations, data analysis, text manipulation, date operations, and logical evaluations. @@ -345,11 +294,11 @@ If you enter an invalid formula in a cell, an error dialog with an error message ## Note -You can refer to our [React Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/react-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [React Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/react-spreadsheet-editor) to knows how to present and manipulate data. +You can refer to our [ASP.NET Core Spreadsheet](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) feature tour page for its groundbreaking feature representations. You can also explore our [ASP.NET Core Spreadsheet example](https://www.syncfusion.com/spreadsheet-editor-sdk/asp-net-core-spreadsheet-editor) to knows how to present and manipulate data. ## See Also * [Editing](./editing) * [Formatting](./formatting) * [Open](./open-save#open) -* [Save](./open-save#save) \ No newline at end of file +* [Save](./open-save#save)