From 1ee1222c29e117532d92d5f6aa8589a60db207c5 Mon Sep 17 00:00:00 2001 From: RajClinton26 Date: Wed, 22 Jul 2026 11:24:05 +0530 Subject: [PATCH 1/3] WPF-Spreadsheet-UGCorrection --- .../Excel/Spreadsheet/UWP/Getting-Started.md | 6 +++--- .../Excel/Spreadsheet/WPF/Getting-Started.md | 6 +++--- .../Excel/Spreadsheet/Winforms/Getting-Started.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Document-Processing/Excel/Spreadsheet/UWP/Getting-Started.md b/Document-Processing/Excel/Spreadsheet/UWP/Getting-Started.md index f4b6b5b5eb..00c6ffb96d 100644 --- a/Document-Processing/Excel/Spreadsheet/UWP/Getting-Started.md +++ b/Document-Processing/Excel/Spreadsheet/UWP/Getting-Started.md @@ -46,15 +46,15 @@ Optional NuGet Packages Description -[Syncfusion.SfSpreadsheetHelper.UWP](https://www.nuget.org/packages/Syncfusion.SfSpreadsheetHelper.UWP) +{{'[Syncfusion.SfSpreadsheetHelper.UWP](https://www.nuget.org/packages/Syncfusion.SfSpreadsheetHelper.UWP)' | markdownify}} Contains the classes responsible for importing charts and sparklines into SfSpreadsheet. -[Syncfusion.ExcelChartToImageConverter.UWP](https://www.nuget.org/packages/Syncfusion.ExcelChartToImageConverter.UWP) +{{'[Syncfusion.ExcelChartToImageConverter.UWP](https://www.nuget.org/packages/Syncfusion.ExcelChartToImageConverter.UWP)' | markdownify}} Contains the classes responsible for converting charts to images. -[Syncfusion.SfChart.UWP](https://www.nuget.org/packages/Syncfusion.SfChart.UWP) +{{'[Syncfusion.SfChart.UWP](https://www.nuget.org/packages/Syncfusion.SfChart.UWP)' | markdownify}} Contains the classes responsible for importing chart types such as line charts, pie charts, and sparklines. diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Getting-Started.md b/Document-Processing/Excel/Spreadsheet/WPF/Getting-Started.md index 551b09f45d..ce728e368b 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Getting-Started.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Getting-Started.md @@ -45,15 +45,15 @@ Optional NuGet Packages Description -[Syncfusion.SfSpreadsheetHelper.WPF](https://www.nuget.org/packages/Syncfusion.SfSpreadsheetHelper.WPF) +{{'[Syncfusion.SfSpreadsheetHelper.WPF](https://www.nuget.org/packages/Syncfusion.SfSpreadsheetHelper.WPF)' | markdownify}} Contains the classes that are responsible for importing charts and sparklines into SfSpreadsheet. -[Syncfusion.ExcelChartToImageConverter.WPF](https://www.nuget.org/packages/Syncfusion.ExcelChartToImageConverter.WPF) +{{'[Syncfusion.ExcelChartToImageConverter.WPF](https://www.nuget.org/packages/Syncfusion.ExcelChartToImageConverter.WPF)' | markdownify}} Contains the classes that are responsible for converting charts as images. -[Syncfusion.SfChart.WPF](https://www.nuget.org/packages/Syncfusion.SfChart.WPF) +{{'[Syncfusion.SfChart.WPF](https://www.nuget.org/packages/Syncfusion.SfChart.WPF)' | markdownify}} Contains the classes that are responsible for importing charts such as Line, Pie, Column, and Bar charts. Sparklines are handled by Syncfusion.SfSpreadsheetHelper.WPF, not by this package. diff --git a/Document-Processing/Excel/Spreadsheet/Winforms/Getting-Started.md b/Document-Processing/Excel/Spreadsheet/Winforms/Getting-Started.md index ea7c934405..5e605db5df 100644 --- a/Document-Processing/Excel/Spreadsheet/Winforms/Getting-Started.md +++ b/Document-Processing/Excel/Spreadsheet/Winforms/Getting-Started.md @@ -41,15 +41,15 @@ Optional NuGet Packages Description -[Syncfusion.SpreadsheetHelper.Windows](https://www.nuget.org/packages/Syncfusion.SpreadsheetHelper.Windows) +{{'[Syncfusion.SpreadsheetHelper.Windows](https://www.nuget.org/packages/Syncfusion.SpreadsheetHelper.Windows)' | markdownify}} Contains the classes that import charts and sparklines into the Spreadsheet. -[Syncfusion.ExcelChartToImageConverter.WPF](https://www.nuget.org/packages/Syncfusion.ExcelChartToImageConverter.WPF) +{{'[Syncfusion.ExcelChartToImageConverter.WPF](https://www.nuget.org/packages/Syncfusion.ExcelChartToImageConverter.WPF)' | markdownify}} Contains the classes that convert charts to images. -[Syncfusion.Chart.Windows](https://www.nuget.org/packages/Syncfusion.Chart.Windows) +{{'[Syncfusion.Chart.Windows](https://www.nuget.org/packages/Syncfusion.Chart.Windows)' | markdownify}} Contains the classes that create charts that hold axes, series, and legends. From 82790de24c57e8e4695749e227b212679913206b Mon Sep 17 00:00:00 2001 From: RajClinton26 Date: Wed, 22 Jul 2026 16:22:24 +0530 Subject: [PATCH 2/3] WPF-Spreadsheet-UGCorrection --- .../Spreadsheet/WPF/Cell-Customization.md | 38 ++-- .../WPF/Compare-Classic-Spreadsheet.md | 54 +++-- .../Spreadsheet/WPF/Conditional-Formatting.md | 53 +++-- .../Excel/Spreadsheet/WPF/Conversion.md | 23 +- .../Excel/Spreadsheet/WPF/Custom-Formula.md | 9 +- .../Excel/Spreadsheet/WPF/Customize-a-Cell.md | 22 +- .../Excel/Spreadsheet/WPF/Data-Management.md | 9 +- .../Excel/Spreadsheet/WPF/Editing.md | 108 +++++----- .../Excel/Spreadsheet/WPF/Find-and-Replace.md | 28 +-- .../Excel/Spreadsheet/WPF/Formatting.md | 62 +++--- .../Excel/Spreadsheet/WPF/Formulas.md | 34 +-- .../Spreadsheet/WPF/Interactive-Features.md | 71 +++---- .../Excel/Spreadsheet/WPF/Limitations.md | 6 +- .../Excel/Spreadsheet/WPF/Localization.md | 25 ++- .../Excel/Spreadsheet/WPF/Outline.md | 59 +++--- .../Excel/Spreadsheet/WPF/Overview.md | 42 ++-- .../Excel/Spreadsheet/WPF/Printing.md | 4 +- .../Spreadsheet/WPF/Ribbon-Customization.md | 36 ++-- .../Excel/Spreadsheet/WPF/Rows-and-Columns.md | 75 +++---- .../Excel/Spreadsheet/WPF/Selection.md | 200 +++++++++--------- .../Excel/Spreadsheet/WPF/Shapes.md | 89 +++++--- .../Spreadsheet/WPF/Sorting-and-Filtering.md | 14 +- .../Excel/Spreadsheet/WPF/Themes.md | 35 ++- .../Spreadsheet/WPF/Workbook-Operations.md | 14 +- .../WPF/Working-with-SfSpreadsheet.md | 146 ++++++------- .../Spreadsheet/WPF/Worksheet-Management.md | 95 ++++----- 26 files changed, 715 insertions(+), 636 deletions(-) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md b/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md index 7c35f9d22b..458569c7a2 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md @@ -9,18 +9,18 @@ documentation: ug # Cell Customization in WPF Spreadsheet (SfSpreadsheet) -SfSpreadsheet provides support to customize the cell with Data template. It allows to load any WPF control or custom control into the cell. +SfSpreadsheet supports cell customization through a data template, allowing any built-in WPF control or custom control to be hosted in a cell. Use this approach to embed interactive UI such as buttons, combo boxes, or expanders directly inside spreadsheet cells. -In order to customize the cell, please follow the below steps +To customize a cell, follow these steps: -* Create a DataTemplate -* Override the SpreadsheetColumn class -* Create the Custom Cell Renderer -* Associating the Custom Cell Renderer to SpreadsheetGrid +1. Create a DataTemplate. +2. Derive from the SpreadsheetColumn class. +3. Create a Custom Cell Renderer. +4. Associate the Custom Cell Renderer with SpreadsheetGrid. **Create a DataTemplate** -Create a custom DataTemplate (For ex: Button Template) in the Main window.xaml file, +Create a custom DataTemplate (for example, a Button template) in MainWindow.xaml. Define the template as a resource on the window (or in App.xaml) so it can be referenced by key from code. {% tabs %} {% highlight xaml %} @@ -31,11 +31,11 @@ Create a custom DataTemplate (For ex: Button Template) in the Main window.xaml f {% endhighlight %} {% endtabs %} -**Override the SpreadsheetColumn class** +**Derive from the SpreadsheetColumn Class** -Create an extension class SpreadsheetColumnExt by overriding the [SpreadsheetColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetColumn.html) Class which holds all the operations related with cells. +Create an extension class `SpreadsheetColumnExt` that inherits from the [SpreadsheetColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetColumn.html) class, which holds all the operations related to cells. -Now override the function `OnUpdateColumn` which updates the column properties (cell types, renderer, cell element, etc.) and get the data template which is used for displaying in the particular cell. +Override the `OnUpdateColumn` method, which updates the column properties (cell types, renderer, cell element, and so on), and retrieve the data template used to display content in the cell. {% tabs %} {% highlight c# %} @@ -78,11 +78,11 @@ base.OnUpdateColumn(out oldElement); {% endhighlight %} {% endtabs %} -**Create the Custom Cell Renderer** +**Create a Custom Cell Renderer** -Create a SpreadsheetTemplateCellRenderer class by overriding the [SpreadsheetVirtualizingCellRendererBase](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase-2.html) class to display the defined custom renderer element. +Create a `SpreadsheetTemplateCellRenderer` class that inherits from the [SpreadsheetVirtualizingCellRendererBase](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase-2.html) class to display the custom renderer element. -For initializing the display element, set the content template in `OnInitializeDisplayElement` method and for editing, set the content template in `OnInitializeEditElement` method otherwise it will load the default display and edit element in the cells +To initialize the display element, set the content template in the `OnInitializeDisplayElement` method; to initialize editing, set the content template in the `OnInitializeEditElement` method. Otherwise, the cells will load the default display and edit elements. {% tabs %} {% highlight c# %} @@ -135,13 +135,13 @@ protected override void OnInitializeEditElement(RowColumnIndex rowColumnIndex, C {% endhighlight %} {% endtabs %} -N> If you want to load the default edit element, then no need to override the `OnInitializeEditElement` method. +N> If you want to load the default edit element, you do not need to override the `OnInitializeEditElement` method. -**Associating the Custom Cell Renderer to SpreadsheetGrid** +**Associate the Custom Cell Renderer with SpreadsheetGrid** -To associate the custom cell renderer in [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html), invoke the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_WorkbookLoaded) Event of SfSpreadsheet and initialize the SpreadsheetTemplateCellRenderer and add it to the renderer collection. +To associate the custom cell renderer with [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html), subscribe to the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_WorkbookLoaded) event of `SfSpreadsheet` (in XAML or in code-behind after the control is initialized). In the handler, initialize the `SpreadsheetTemplateCellRenderer` and add it to the renderer collection. -Invoke the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_QueryRange) Event of `SpreadsheetGrid` and set the CellType of particular range to be “DataTemplate” to load the user defined template. +Next, handle the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_QueryRange) event of `SpreadsheetGrid` and set the `CellType` of the particular range to "DataTemplate" to load the user-defined template. {% tabs %} {% highlight c# %} @@ -175,7 +175,7 @@ void grid_QueryRange(object sender, SpreadsheetQueryRangeEventArgs e) {% endhighlight %} {% endtabs %} -For more reference, please find the [customization](https://www.syncfusion.com/downloads/support/directtrac/general/ze/Cell_Customization-850724053) sample. +For more details, see the [customization](https://www.syncfusion.com/downloads/support/directtrac/general/ze/Cell_Customization-850724053) sample. -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +N> See the [WPF Spreadsheet](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for an overview of its capabilities. You can also explore the [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) on GitHub to see how to render and configure the spreadsheet. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md b/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md index c441101939..ba7edd90cf 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md @@ -6,13 +6,15 @@ platform: document-processing control: SfSpreadsheet documentation: ug --- -# Spreadsheet Comparison in WPF Spreadsheet +# Spreadsheet Comparison in WPF -## Choose between SfSpreadsheet and Spreadsheet (Classic) control +**SfSpreadsheet** is the recommended choice for new development and for migrating from the legacy Spreadsheet (Classic) control. It delivers improved scrolling performance, broader formula support, workbook-level undo/redo, and richer formatting and validation features. -WPF suite contains **SfSpreadsheet** and **Spreadsheet (Classic)** control for viewing and editing the excel files. SfSpreadsheet is an alternate for Spreadsheet (Classic) control which is marked as classic control. Hence it is recommended to use SfSpreadsheet which provides better performance and rich set features over Spreadsheet (Classic) control. +## Feature comparison -Below are the features that SfSpreadsheet have over Spreadsheet (Classic) control, +WPF suite contains **SfSpreadsheet** and **Spreadsheet (Classic)** controls for viewing and editing Excel files. SfSpreadsheet is the recommended replacement for the legacy Spreadsheet (Classic) control. Hence, it is recommended to use SfSpreadsheet, which provides better performance and a rich set of features over the Spreadsheet (Classic) control. + +Below are the features that SfSpreadsheet has over the Spreadsheet (Classic) control: @@ -22,40 +24,40 @@ SfSpreadsheet +Supports fast and fluid scrolling even if the Excel file has a huge set of data. Thus, its performance is higher than that of the Spreadsheet (Classic) control. +Supports various paste options similar to Excel options, such as Paste, Formulas, Values, Formula and Source Formatting, Values and Source Formatting, and Formatting alone. It also provides better performance compared to the Spreadsheet (Classic) control. +Supports undo/redo functionalities similar to those achieved with Microsoft Office-type applications. This operation records the changes in the whole workbook, while the Spreadsheet (Classic) control records the changes at the sheet level only. +Provides support for 400+ of the most widely used formulas and uses a multi-threading concept, so the calculation speed is also high compared to the Spreadsheet (Classic) control. +Provides support to float a cell in both display and edit modes. +Provides support for the Hyperlink feature, letting you create hyperlinks to existing files, web pages, or email addresses. +Provides support to define and import conditional formatting rules, such as Data Bars, Icon Sets, and Color Scales, which are used to visualize the data. +Provides support for cross-sheet reference validation and list validation with formula/cell references compared to the Spreadsheet (Classic) control.
Scrolling performance -Supports fast and fluid scrolling even if the excel has a huge set of data .Thus its performance is high compared to Spreadsheet (Classic) control.
Copy Paste -Supports various paste options similar to excel options like Paste, Formulas, Values, Formula and Source Formatting, Values and Source Formatting and Formatting alone. It also provides a good performance compared to Spreadsheet (Classic) control.
Undo/Redo -Supports undo/redo functionalities similar to those achieved with Microsoft Office-type applications. This operation records the changes in the whole workbook while Spreadsheet (Classic) Control records the changes in sheet level only.
Formula calculation -Provides support for 400+ most widely used formulas and uses Multi-threading concept So, the calculation speed is also high compared to Spreadsheet (Classic) control.
Floating Cells -Provides support to float cell both in display and edit mode.
Hyperlinks -Provides support for Hyperlink feature which you can create hyperlink for existing files or web page and email addresses too.
Conditional Formatting -Provides support to define and import the conditional formatting rules such as Data Bars, Icon Sets and Color Scales options which are used to visualize the data.
Data validation -Provides support for validation for cross sheet references and list validation with formula/cell references compared to Spreadsheet (Classic) control.
-### Properties table +### API mapping -Below are the properties difference between SfSpreadsheet and Spreadsheet (Classic) control, +Below are the property differences between SfSpreadsheet and the Spreadsheet (Classic) control: @@ -72,43 +74,49 @@ Gets the active SpreadsheetGrid +Gets or sets whether the custom context menu is enabled +Gets or sets whether the tab item context menu is displayed +Gets or sets the context menu items for the tab item +Gets the current active sheet +Gets the underlying Workbook instance +Gets the style of the current cell +Gets the command stack of the SfSpreadsheet. Undo/redo is enabled by default. +Gets the name of the active sheet tab
{{'[IsCustomTabItemContextMenuEnabled](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_IsCustomTabItemContextMenuEnabled)'| markdownify }} TabStyleManager -> IsCustomTabItemContextMenuEnabled -Gets or sets whether Custom ContextMenu is to be Enabled
{{ '[ShowTabItemContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.Controls.TabControlExt.html#Syncfusion_Windows_Tools_Controls_TabControlExt_ShowTabItemContextMenu)' | markdownify }} TabStyleManager -> ShowTabItemContextMenu -Gets or sets whether TabItemContextMenu is to be displayed
{{ '[TabItemContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_TabItemContextMenu)' | markdownify }} TabStyleManager ->TabItemContextMenu -Gets or sets the ContextMenu Items for TabItem
{{ '[ActiveSheet](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ActiveSheet)' | markdownify }} ExcelProperties->Workbook->ActiveSheet -Gets the Current ActiveSheet
{{ '[Workbook](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Workbook)' | markdownify }} ExcelProperties->Workbook -
{{ '[CurrentCellStyle](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_CurrentCellStyle)' | markdownify }} GridProperties->CurrentCellStyle -Gets the Style of the Current Cell
{{ '[HistoryManager](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_HistoryManager)' | markdownify }} GridProperties.ActiveSpreadsheetGrid.Model.CommandStack -Gets the command stack of the SfSpreadsheet.By default it has been enabled
{{ '[SheetName](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SheetName)' | markdownify }} GridProperties->CurrentSheetName -Gets the tab sheet name
-N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +N> See the [WPF Spreadsheet](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for a visual overview, and explore the [WPF Spreadsheet samples](https://github.com/syncfusion/wpf-demos) for runnable examples of rendering and configuring the control. + +## See also + +- [Getting started with SfSpreadsheet](https://help.syncfusion.com/wpf/spreadsheet/getting-started) +- [WPF Spreadsheet feature tour](https://www.syncfusion.com/wpf-controls/spreadsheet) +- [WPF Spreadsheet samples on GitHub](https://github.com/syncfusion/wpf-demos) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md b/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md index 73230946d1..086f1a4051 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md @@ -9,13 +9,13 @@ documentation: ug # Conditional Formatting in WPF Spreadsheet (SfSpreadsheet) -This section explains about how to apply conditional formatting rules programmatically at run time in SfSpreadsheet. +This section explains how to apply conditional formatting rules programmatically at run time in SfSpreadsheet. -In SfSpreadsheet, to apply conditional format for a cell or range of cells, add [IConditionalFormat](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormat.html) to that range by using [AddCondition](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormats.html#Syncfusion_XlsIO_IConditionalFormats_AddCondition) method. +In SfSpreadsheet, to apply a conditional format to a cell or range of cells, add an [IConditionalFormat](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormat.html) to that range by using the [AddCondition](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormats.html#Syncfusion_XlsIO_IConditionalFormats_AddCondition) method, then call `InvalidateCell` on `ActiveGrid` to refresh the view. {% tabs %} {% highlight c# %} -var worksheet =spreadsheet.Workbook.Worksheets[0]; +var worksheet = spreadsheet.Workbook.Worksheets[0]; IConditionalFormats condition = worksheet.Range["A1"].ConditionalFormats; IConditionalFormat condition1 = condition.AddCondition(); {% endhighlight %} @@ -23,9 +23,9 @@ IConditionalFormat condition1 = condition.AddCondition(); ## Highlight Cell Rules -### Based on CellValue +### Based on Cell Value -To format the cells based on cell value, define the conditional format type as **CellValue** and other formatting options such as formula, operator, background color etc., to the specified cell or range. Finally, invalidate the cells to refresh the view. +To format cells based on a cell value, set the format type to **CellValue** and configure options such as the formula, operator, and background color. Then, invalidate the cells to refresh the view. {% tabs %} {% highlight c# %} @@ -40,9 +40,11 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(1)); {% endhighlight %} {% endtabs %} +> Use `SecondFormula` together with `FirstFormula` when the operator is `Between` or `NotBetween`. + ### Based on Formula or Cell References -To format the cells based on Formula or Cell References, define the conditional format type as **Formula** and other formatting options such as formula, background color etc., to the specified cell or range. Finally, invalidate the cells to refresh the view. +To format cells based on a formula or cell reference, set the format type to **Formula** and configure options such as the formula and background color. Then, invalidate the cells to refresh the view. {% tabs %} {% highlight c# %} @@ -56,9 +58,9 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(1)); {% endhighlight %} {% endtabs %} -### Based on SpecificText +### Based on Specific Text -To format the cells based on specified text, define the conditional format type as **SpecificText** and other formatting options such as the particular text, operator, background color etc., to the specified cell or range. Finally, invalidate the cells to refresh the view. +To format cells based on a specified text, set the format type to **SpecificText** and configure options such as the text, operator, and background color. Then, invalidate the cells to refresh the view. {% tabs %} {% highlight c# %} @@ -73,9 +75,11 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(1)); {% endhighlight %} {% endtabs %} -### Based on TimePeriod +### Based on Time Period + +To format cells based on a time period, set the format type to **TimePeriod** and configure the time period type and background color. The `Operator` property is not required for `TimePeriod`. Then, invalidate the cells to refresh the view. -To format the cells based on time period, define the conditional format type as **TimePeriod** and other formatting options such as the time periods for the date, operator, background color etc., to the specified cell or range. Finally, invalidate the cells to refresh the view. +Supported `CFTimePeriods` values include: `Today`, `Yesterday`, `Tomorrow`, `Last7Days`, `ThisWeek`, `LastWeek`, `ThisMonth`, `LastMonth`. {% tabs %} {% highlight c# %} @@ -83,24 +87,26 @@ var worksheet = spreadsheet.Workbook.Worksheets[0]; IConditionalFormats condition = worksheet.Range["A1:A100"].ConditionalFormats; IConditionalFormat condition1 = condition.AddCondition(); condition1.FormatType = ExcelCFType.TimePeriod; -condition1.TimePeriodType = CFTimePeriods.Today +condition1.TimePeriodType = CFTimePeriods.Today; condition1.BackColor = ExcelKnownColors.Light_orange; spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(1)); {% endhighlight %} {% endtabs %} -Sample Output +Sample output ![WPF Spreadsheet Conditional Formatting with Time Period](Conditional-Formatting_images/wpf-spreadsheet-conditional-formatting-with-time-period.jpeg) ## Data Bars -To apply the conditional format based on data bars,define the conditional format type as a **DataBar** and specify the properties associated with DataBars such as bar color, MinPoint, MaxPoint etc.,.to the specified cell or range. Finally, invalidate that cells to update the view. +To apply a conditional format based on data bars, set the format type to **DataBar** and configure the associated properties such as the bar color, `MinPoint`, and `MaxPoint`. Then, invalidate the cells to update the view. + +Supported `ConditionValueType` values include: `LowestValue`, `HighestValue`, `Number`, `Percent`, `Formula`, `Automatic`,and `Percentile`. {% tabs %} {% highlight c# %} var worksheet = spreadsheet.Workbook.Worksheets[0]; -var conditionalFormats = worksheet.Range["B1:B100"].ConditionalFormats; +var conditionalFormats = worksheet.Range["B1:B100"].ConditionalFormats; var conditionalFormat = conditionalFormats.AddCondition(); conditionalFormat.FormatType = ExcelCFType.DataBar; conditionalFormat.DataBar.BarColor = Color.FromArgb(255, 214, 0, 123); @@ -110,13 +116,13 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(2)); {% endhighlight %} {% endtabs %} -Sample Output +Sample output ![WPF Spreadsheet Conditional Formatting with Data Bars](Conditional-Formatting_images/wpf-spreadsheet-conditional-formatting-with-data-bars.jpeg) ## Color Scales -To apply the conditional format based on color scales, define the conditional format type as a **ColorScale** and specify the other properties associated with ColorScale such as condition count,color criteria etc.,to the specified cell or range. Finally,invalidate that cells to update the view. +To apply a conditional format based on color scales, set the format type to **ColorScale** and configure the associated properties such as the condition count and color criteria. Then, invalidate the cells to update the view. {% tabs %} {% highlight c# %} @@ -131,18 +137,20 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(3)); {% endhighlight %} {% endtabs %} -Sample Output +Sample output ![WPF Spreadsheet Conditional Formatting with Color Scales](Conditional-Formatting_images/wpf-spreadsheet-conditional-formatting-with-color-scales.jpeg) ## Icon Sets -To apply the conditional format for Icon sets, define the conditional format type as **IconSet** and the properties associated with IconSet such as the type of the icon,criteria etc., to the specified cell or range. Finally, invalidate that cells to update the view. +To apply a conditional format for icon sets, set the format type to **IconSet** and configure the associated properties such as the icon type and criteria. Then, invalidate the cells to update the view. + +Supported `ExcelIconSetType` values include: `ThreeArrows`, `ThreeArrowsGray`, `ThreeFlags`, `ThreeTrafficLights1`, `ThreeTrafficLights2`, `ThreeSigns`, `ThreeSymbols`, `ThreeSymbols2`, `FourArrows`, `FourArrowsGray`, `FourRedToBlack`, `FourRating`, `FourTrafficLights`, `FiveArrows`, `FiveArrowsGray`, `FiveRating`, and `FiveQuarters`. {% tabs %} {% highlight c# %} -vvar worksheet = spreadsheet.Workbook.Worksheets[0]; +var worksheet = spreadsheet.Workbook.Worksheets[0]; var conditionalFormats = worksheet.Range["D2:D100"].ConditionalFormats; var conditionalFormat = conditionalFormats.AddCondition(); conditionalFormat.FormatType = ExcelCFType.IconSet; @@ -151,9 +159,12 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(4)); {% endhighlight %} {% endtabs %} -Sample Output +Sample output ![WPF Spreadsheet Conditional Formatting with Icon Sets](Conditional-Formatting_images/wpf-spreadsheet-conditional-formatting-with-icon-sets.jpeg) -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +> **See also:** +> - [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour +> - [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) on GitHub +> - Related: [Cell Formatting](https://help.syncfusion.com/wpf/spreadsheet/cell-formatting), [Number Formatting](https://help.syncfusion.com/wpf/spreadsheet/number-formatting) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md b/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md index ec71dd6be2..99e36eeeaa 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md @@ -8,11 +8,11 @@ documentation: ug --- # Conversion in WPF Spreadsheet (SfSpreadsheet) -This section explains about the conversion of workbook in SfSpreadsheet into image, PDF and HTML +This section explains how to convert a workbook in SfSpreadsheet into an image, PDF, and HTML. ## Convert to Image -SfSpreadsheet provides support to convert a worksheet in to an image of type Bitmap or Metafile based on the input range of rows and columns with all basic formats preserved, By using the [ConvertToImage](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_ConvertToImage_System_Int32_System_Int32_System_Int32_System_Int32_) method,worksheet can be converted into an image. +SfSpreadsheet supports converting a worksheet into an image of type `Bitmap` or `Metafile` based on the specified range of rows and columns, with all basic formats preserved. Use the [ConvertToImage](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_ConvertToImage_System_Int32_System_Int32_System_Int32_System_Int32_) method of [IWorksheet](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html) to perform the conversion. {% tabs %} {% highlight c# %} @@ -28,31 +28,31 @@ System.Diagnostics.Process.Start("Sample.png"); ## Convert to PDF -SfSpreadsheet provides support to export the Excel workbook to PDF using ExcelToPdfConverter. +SfSpreadsheet supports exporting the Excel workbook to PDF using `ExcelToPdfConverter`. For converting the Excel sheet to PDF, “Syncfusion.ExcelToPDFConverter.Base.dll” and “Syncfusion.Pdf.Base.dll” references should be added. -Export the Excel workbook as PDF document using [Convert](https://help.syncfusion.com/cr/wpf/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter_Convert) method of [ExcelToPdfConverter](https://help.syncfusion.com/cr/wpf/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html) class which is available under the name space “Syncfusion.ExcelToPdfConverter” +Export the Excel workbook as a PDF document using the [Convert](https://help.syncfusion.com/cr/wpf/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html#Syncfusion_ExcelToPdfConverter_ExcelToPdfConverter_Convert) method of the [ExcelToPdfConverter](https://help.syncfusion.com/cr/wpf/Syncfusion.ExcelToPdfConverter.ExcelToPdfConverter.html) class in the `Syncfusion.ExcelToPdfConverter` namespace. {% tabs %} {% highlight c# %} ExcelToPdfConverter converter = new ExcelToPdfConverter(spreadsheet.Workbook); -//Initialize the PdfDocument +// Initialize the PdfDocument PdfDocument pdfDoc = new PdfDocument(); -//Initialize the ExcelToPdfConverter Settings +// Initialize the ExcelToPdfConverter settings ExcelToPdfConverterSettings settings = new ExcelToPdfConverterSettings(); settings.LayoutOptions = LayoutOptions.NoScaling; -//Assign the PdfDocument to the templateDocument property of ExcelToPdfConverterSettings +//Assign the PdfDocument to the TemplateDocument property of ExcelToPdfConverterSettings settings.TemplateDocument = pdfDoc; settings.DisplayGridLines = GridLinesDisplayStyle.Invisible; -//Convert Excel Document into PDF document +// Convert Excel document into PDF document pdfDoc = converter.Convert(settings); -//Save the PDF file +// Save the PDF file pdfDoc.Save("Sample.pdf"); System.Diagnostics.Process.Start("Sample.pdf"); {% endhighlight %} @@ -60,7 +60,7 @@ System.Diagnostics.Process.Start("Sample.pdf"); ## Convert to HTML -SfSpreadsheet provides support to convert the excel workbook into HTML page. +SfSpreadsheet supports converting the Excel workbook into an HTML page using the `SaveAsHtml` method on the underlying `IWorkbook`. The second argument accepts an `HtmlSaveOptions` instance to control how styles, images, and unsupported features are emitted. {% tabs %} {% highlight c# %} @@ -69,5 +69,4 @@ System.Diagnostics.Process.Start("Sample.html"); {% endhighlight %} {% endtabs %} - -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +> **Note:** You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md b/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md index 2a1e890eb8..e553e54ec8 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md @@ -9,7 +9,7 @@ documentation: ug # Custom Formula in WPF Spreadsheet (SfSpreadsheet) -SfSpreadsheet allows you to add custom formulas into its function library. You can add the custom formula into the SfSpreadsheet by using the [AddFunction](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.FormulaEngine.html#Syncfusion_UI_Xaml_CellGrid_FormulaEngine_AddFunction_System_String_Syncfusion_UI_Xaml_CellGrid_FormulaEngine_LibraryFunction_) method of [FormulaEngine](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.FormulaEngine.html), +SfSpreadsheet allows you to add custom formulas to its function library by using the [AddFunction](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.FormulaEngine.html#Syncfusion_UI_Xaml_CellGrid_FormulaEngine_AddFunction_System_String_Syncfusion_UI_Xaml_CellGrid_FormulaEngine_LibraryFunction_) method of [FormulaEngine](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.FormulaEngine.html). {% tabs %} {% highlight c# %} @@ -17,7 +17,6 @@ spreadsheet.WorkbookLoaded += spreadsheet_WorkbookLoaded; void spreadsheet_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) { - foreach (var grid in args.GridCollection) AddCustomFormula(grid); @@ -38,11 +37,11 @@ private void AddCustomFormula(SpreadsheetGrid grid) public string ComputeLength(string range) { - //Used to calculate the length of the string + // Calculate the length of the supplied string. return range.Length.ToString(); -} +} {% endhighlight %} {% endtabs %} -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +N> After the formula is registered, you can also type `=Length("sample")` directly into a cell instead of calling `SetCellValue`. For more information, see the [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour or browse the [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos). \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md b/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md index b07afa2106..4f12cb745e 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md @@ -9,9 +9,9 @@ documentation: ug # Customize a Cell in WPF Spreadsheet Control -SfSpreadsheet provides support to customize the cell with Data template. It allows to load any WPF control or custom control into the cell. +SfSpreadsheet supports customizing a cell with a `DataTemplate`. It allows you to load any WPF or custom control into a cell. -In order to customize the cell, please follow the below steps +To customize a cell, follow these steps: * Create a DataTemplate * Override the SpreadsheetColumn class @@ -20,7 +20,7 @@ In order to customize the cell, please follow the below steps **Create** **a** **DataTemplate**: -Create a custom DataTemplate (For ex: Button Template) in the Main window.xaml file, +Create a custom `DataTemplate` (for example, an Button template) in the `MainWindow.xaml` file: {% highlight xaml %} @@ -36,7 +36,7 @@ Create a custom DataTemplate (For ex: Button Template) in the Main window.xaml f **Override** **the** **SpreadsheetColumn** **class** -Create an extension class SpreadsheetColumnExt by overriding the [SpreadsheetColumn](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetColumn.html) Class which holds all the operations related with cells. +Create an extension class `SpreadsheetColumnExt` by inheriting from the [SpreadsheetColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetColumn.html) class, which holds all the operations related to cells. Now override the function [OnUpdateColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetColumn.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetColumn_OnUpdateColumn_System_Windows_FrameworkElement__) which updates the column properties (cell types, renderer, cell element, etc.) and get the data template which is used for displaying in the particular cell. @@ -63,7 +63,7 @@ public DataTemplate CellEditTemplate set; } -//Update the cell with the defined template +// Update the cell with the defined template protected override void OnUpdateColumn(out FrameworkElement oldElement) { if (RowIndex == 3 && ColumnIndex == 6) @@ -79,7 +79,7 @@ protected override void OnUpdateColumn(out FrameworkElement oldElement) **Create** **the** **Custom** **Cell** **Renderer**: -Create a SpreadsheetTemplateCellRenderer class by overriding the [SpreadsheetVirtualizingCellRendererBase](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase%602.html) class to display the defined custom renderer element. +Create a `SpreadsheetTemplateCellRenderer` class by inheriting from the [SpreadsheetVirtualizingCellRendererBase](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase%602.html) class to display the defined custom renderer element. For initializing the display element, set the content template in [OnInitializeDisplayElement](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase-2.html#Syncfusion_UI_Xaml_Spreadsheet_CellRenderer_SpreadsheetVirtualizingCellRendererBase_2_OnInitializeDisplayElement_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex__0_Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetColumn_) method and for editing, set the content template in [OnInitializeEditElement](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.CellRenderer.SpreadsheetVirtualizingCellRendererBase-2.html#Syncfusion_UI_Xaml_Spreadsheet_CellRenderer_SpreadsheetVirtualizingCellRendererBase_2_OnInitializeEditElement_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex__1_Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetColumn_) method otherwise it will load the default display and edit element in the cells @@ -113,7 +113,7 @@ protected override void OnUpdateEditCellStyle (RowColumnIndex cellRowColumnIndex base.OnUpdateEditCellStyle (cellRowColumnIndex, uiElement, column); } -//To initialize the display element on the cell +// To initialize the display element on the cell protected override void OnInitializeDisplayElement(RowColumnIndex rowColumnIndex, ContentControl uiElement, SpreadsheetColumn column) { uiElement.ContentTemplate = (column as SpreadsheetColumnExt).CellItemTemplate; @@ -129,13 +129,13 @@ protected override void OnInitializeEditElement(RowColumnIndex rowColumnIndex, C {% endhighlight %} -N> If you want to load the default edit element, then no need to override the `OnInitializeEditElement` method. +> **Note:** If you want to load the default edit element, you do not need to override the `OnInitializeEditElement` method. **Associating** **the** **Custom** **Cell** **Renderer** **to** **SpreadsheetGrid** -To associate the custom cell renderer in [SpreadsheetGrid](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html), invoke the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) Event of SfSpreadsheet and initialize the SpreadsheetTemplateCellRenderer and add it to the renderer collection. +To associate the custom cell renderer with the [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html), handle the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) event of `SfSpreadsheet`, initialize the `SpreadsheetTemplateCellRenderer`, and add it to the renderer collection. -Invoke the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) Event of `SpreadsheetGrid` and set the CellType of particular range to be “DataTemplate” to load the user defined template. +Handle the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) event of `SpreadsheetGrid` and set the `CellType` of a particular range to `DataTemplate` to load the user-defined template. {% highlight c# %} @@ -168,5 +168,5 @@ void grid_QueryRange(object sender, SpreadsheetQueryRangeEventArgs e) {% endhighlight %} -For more reference, please find the [customization](http://www.syncfusion.com/downloads/support/directtrac/general/ze/Cell_Customization-850724053) sample. +For a working example, refer to the [customization sample](https://www.syncfusion.com/downloads/support/directtrac/general/ze/Cell_Customization-850724053). diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md b/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md index 2bc44c4a0b..76b4d31942 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md @@ -8,7 +8,7 @@ documentation: ug --- # Data Management in WPF Spreadsheet (SfSpreadsheet) -This section explains about how to import and export the DataTable in `SfSpreadsheet`. +SfSpreadsheet supports importing and exporting worksheet data to and from a `DataTable`. This is useful when binding spreadsheet data to data-bound UI controls, persisting it to a database, or exchanging it with other systems. The import and export calls delegate to the underlying `IWorksheet` provided by XlsIO. ## Import from DataTable @@ -30,7 +30,7 @@ spreadsheet.ActiveGrid.InvalidateCells(); {% endhighlight %} {% endtabs %} -For more details regarding importing of data, please refer the [XlsIO UG](http://help.syncfusion.com/file-formats/xlsio/working-with-data#importing-data-to-worksheets) +For more details regarding importing data, please refer to the [XlsIO UG](http://help.syncfusion.com/file-formats/xlsio/working-with-data#importing-data-to-worksheets). The following related overloads are also available on `IWorksheet`: `ImportDataColumn`, `ImportDataView`, `ImportDataTable(IList)`, `BusinessObjectsToWorksheet`, and array-based imports — see the XlsIO link above for examples of each. ## Export to DataTable @@ -45,5 +45,8 @@ DataTable data_table = sheet.ExportDataTable(range, ExcelExportDataTableOptions. {% endhighlight %} {% endtabs %} -For more details regarding exporting of data, please refer the [XlsIO UG](http://help.syncfusion.com/file-formats/xlsio/working-with-data#exporting-from-worksheet-to-data-table) +For more details regarding exporting data, please refer to the [XlsIO UG](http://help.syncfusion.com/file-formats/xlsio/working-with-data#exporting-from-worksheet-to-data-table). + +## See also +* [Formulas in SfSpreadsheet](formulas) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Editing.md b/Document-Processing/Excel/Spreadsheet/WPF/Editing.md index 4d7aa15568..1e65812937 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Editing.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Editing.md @@ -15,10 +15,13 @@ This section explains about the Editing behavior, Data Validation and Hyperlinks The SfSpreadsheet control provides support for editing, you can modify and commit the cell values in the workbook. -By default, Editing will be enabled in `SfSpreadsheet`,but if you want to disable the editing in SfSpreadsheet, then set the [AllowEditing](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_AllowEditing) Property to be false. +By default, editing is enabled in `SfSpreadsheet`. To disable it, set the [AllowEditing](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_AllowEditing) property to `false`. {% tabs %} {% highlight c# %} +// Subscribe to the event (typically in the constructor or page load). +spreadsheet.WorkbookLoaded += spreadsheet_WorkbookLoaded; + void spreadsheet_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) { spreadsheet.ActiveGrid.AllowEditing = false; @@ -30,7 +33,7 @@ void spreadsheet_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) #### Start Editing -User can edit a cell programmatically by using [BeginEdit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCurrentCell.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCurrentCell_BeginEdit_System_Boolean_) method. +You can edit a cell programmatically by using the [BeginEdit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCurrentCell.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCurrentCell_BeginEdit_System_Boolean_) method. {% tabs %} {% highlight c# %} @@ -40,11 +43,11 @@ spreadsheet.ActiveGrid.CurrentCell.BeginEdit(true); #### End Editing -User can end the editing of a cell programmatically in any of the following way, +You can end the editing of a cell programmatically in any of the following ways: -* [ValidateAndEndEdit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_ValidateAndEndEdit) - Validates and ends the edit operation for the current cell. if the cancel is "true", then the current cell remains in edit mode else if the validation is true, commits the new value and moved to next cell or else if the validation is false, it reverts the old value and moved to next cell. +* [ValidateAndEndEdit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_ValidateAndEndEdit) - Validates and ends the edit operation for the current cell. If the `cancel` parameter is `true`, the current cell remains in edit mode; if validation succeeds, the new value is committed and the focus moves to the next cell; if validation fails, the old value is restored and the focus moves to the next cell. -* [EndEdit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_EndEdit_System_Boolean_) - Commits and ends the edit operation for the current cell, if it is passed with parameter _"true"_, commits the new changes for the cell, else reverts the old value. +* [EndEdit](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_EndEdit_System_Boolean_) - Commits and ends the edit operation for the current cell. If passed with the parameter `true`, the new value is committed; otherwise, the old value is restored. {% tabs %} {% highlight c# %} @@ -58,8 +61,10 @@ spreadsheet.ActiveGrid.CurrentCell.EndEdit(true); ### Locking or Unlocking a cell -Locking cells allows you to disable editing and formatting the cells when the sheet is protected. By default, every cells are locked in the worksheet. -But while in protect mode, if you want to edit or format a cell, you can unlock the cells. +Locking cells disables editing and formatting of those cells when the sheet is protected. By default, all cells are locked in the worksheet. +However, when the sheet is protected, you can still edit or format a cell by unlocking it first. + +> **Note:** A cell's lock state has no effect unless the worksheet is also protected (for example, by calling `Worksheet.Protect("password")`). {% tabs %} {% highlight c# %} @@ -105,7 +110,7 @@ Occurs after the current cell is validated. Occurs when the current cell leaves from edit mode. -Below table list the properties associated with Editing. +The following table lists the properties associated with editing. @@ -115,22 +120,22 @@ Description +Gets or sets a value indicating whether the editing operation is allowed. **Default:** `true`. +Gets or sets a value indicating whether the editor selects all the text or places the caret at the end of the existing value when entering edit mode. +Gets or sets a value that indicates which user action causes a cell to enter Edit Mode. +Gets whether the current cell is in edit mode.
{{ '[AllowEditing](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_AllowEditing)' | markdownify }} -Gets or sets the value indicating whether to allow the editing operation or not.
{{ '[EditorSelectionBehavior](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_EditorSelectionBehavior)' | markdownify }} -Gets or sets a value indicating whether editor select all the value or move last position.
{{ '[EditTrigger](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_EditTrigger)' | markdownify }} -Gets or sets a value indicating any of the trigger options will cause cells to enter Edit Mode.
{{ '[IsEditing](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_isEditing)' | markdownify }} -Gets whether the current cell is in edit mode or not.
-Below table list the methods associated with Editing. +The following table lists the methods associated with editing. @@ -152,78 +157,79 @@ Validates and ends the edit operation of the current cell. +Validates the current cell in SfSpreadsheet.
{{ '[Validate](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_Validate_System_Boolean__)' | markdownify }} -Validates the current cell in the SpreadsheetGrid.
## Fill neighboring cells with formula or data -Fill command allows you to fill adjacent groups of cells with the same text, numbers, formulas, or any formatted data. This can be achieved by following these steps: - -* Select a cell or a range of cells to fill with data or formulas from nearby cells. -* Then go to Home > Fill and choose your fill selections (Down, Right, Up and Left). +The fill command fills adjacent cells with the same text, numbers, formulas, or formatted data. To do this: + +* Select a cell or range of cells to fill. +* Go to **Home** > **Fill** and choose the fill direction (**Down**, **Right**, **Up**, or **Left**). ![WPF Spreadsheet Fill](Fill_images/wpf-spreadsheet-fill.png) ## Data Validation -Data Validation is a list of rules to limit the type of data or the values that can be entered in the cell. +Data validation restricts the type or range of values that can be entered in a cell. ### Applying Data Validation at runtime -SfSpreadsheet allows the user to apply the data validation rules at runtime for particular cell or range using `IDataValidation` interface. +SfSpreadsheet allows you to apply data validation rules at runtime for a particular cell or range using the `IDataValidation` interface. {% tabs %} {% highlight c# %} //Number Validation -IDataValidation validation = spreadsheet.ActiveSheet.Range["A5"].DataValidation; -validation.AllowType = ExcelDataType.Integer; -validation.CompareOperator = ExcelDataValidationComparisonOperator.Between; -validation.FirstFormula = "4"; -validation.SecondFormula = "15"; -validation.ShowErrorBox = true; -validation.ErrorBoxText = "Accepts values only between 4 to 15"; +IDataValidation numberValidation = spreadsheet.ActiveSheet.Range["A5"].DataValidation; +numberValidation.AllowType = ExcelDataType.Integer; +numberValidation.CompareOperator = ExcelDataValidationComparisonOperator.Between; +numberValidation.FirstFormula = "4"; +numberValidation.SecondFormula = "15"; +numberValidation.ShowErrorBox = true; +numberValidation.ErrorBoxText = "Accepts values only between 4 to 15"; //Date Validation -IDataValidation validation = spreadsheet.ActiveSheet.Range["B4"].DataValidation; -validation.AllowType = ExcelDataType.Date; -validation.CompareOperator = ExcelDataValidationComparisonOperator.Greater; -validation.FirstDateTime = new DateTime(2016,5,5); -validation.ShowErrorBox = true; -validation.ErrorBoxText = "Enter the date value which is greater than 05/05/2016"; +IDataValidation dateValidation = spreadsheet.ActiveSheet.Range["B4"].DataValidation; +dateValidation.AllowType = ExcelDataType.Date; +dateValidation.CompareOperator = ExcelDataValidationComparisonOperator.Greater; +dateValidation.FirstDateTime = new DateTime(2016,5,5); +dateValidation.ShowErrorBox = true; +dateValidation.ErrorBoxText = "Enter the date value which is greater than 05/05/2016"; //TextLength Validation -IDataValidation validation = spreadsheet.ActiveSheet.Range["A3:B3"].DataValidation; -validation.AllowType = ExcelDataType.TextLength; -validation.CompareOperator = ExcelDataValidationComparisonOperator.LessOrEqual; -validation.FirstFormula = "4"; -validation.ShowErrorBox = true; -validation.ErrorBoxText = "Text length should be lesser than or equal 4 characters"; +IDataValidation textLengthValidation = spreadsheet.ActiveSheet.Range["A3:B3"].DataValidation; +textLengthValidation.AllowType = ExcelDataType.TextLength; +textLengthValidation.CompareOperator = ExcelDataValidationComparisonOperator.LessOrEqual; +textLengthValidation.FirstFormula = "4"; +textLengthValidation.ShowErrorBox = true; +textLengthValidation.ErrorBoxText = "Text length should be lesser than or equal 4 characters"; //List Validation -IDataValidation validation = spreadsheet.ActiveSheet.Range["D4"].DataValidation; -validation.ListOfValues = new string[] { "10", "20", "30" }; +IDataValidation listValidation = spreadsheet.ActiveSheet.Range["D4"].DataValidation; +listValidation.ListOfValues = new string[] { "10", "20", "30" }; //Custom Validation -IDataValidation validation = spreadsheet.ActiveSheet.Range["D4"].DataValidation; -validation.AllowType = ExcelDataType.Formula; -validation.FirstFormula = "=A1+A2>0"; -validation.ErrorBoxText = "Sum of the values in A1 and A2 should be greater than zero"; +IDataValidation customValidation = spreadsheet.ActiveSheet.Range["D4"].DataValidation; +customValidation.AllowType = ExcelDataType.Formula; +customValidation.FirstFormula = "=A1+A2>0"; +customValidation.ErrorBoxText = "Sum of the values in A1 and A2 should be greater than zero"; {% endhighlight %} {% endtabs %} -For more reference, please go through the [XlsIO](http://help.syncfusion.com/file-formats/xlsio/working-with-data-validation) UG. +For more reference, see the [XlsIO](http://help.syncfusion.com/file-formats/xlsio/working-with-data-validation) UG. + -T> If you want to load ComboBox to a cell in SfSpreadsheet, you can apply List Validation to that cell. +> **Tip:** To load a ComboBox in a cell of SfSpreadsheet, apply list validation to that cell. ## Hyperlink -The Hyperlink is a convenient way to access the web pages, files and browse the data within a worksheet or other worksheets in a workbook. SfSpreadsheet provides support to add, edit and remove the Hyperlinks in the workbook. +A hyperlink is a convenient way to access web pages, files, and data within a worksheet or other worksheets in a workbook. SfSpreadsheet supports adding, editing, and removing hyperlinks in the workbook. ### Add a Hyperlink to a cell -SfSpreadsheet provides support to add hyperlink to a cell and it can be added in the hyperlinks collection using `IHyperlinks` interface. +SfSpreadsheet supports adding a hyperlink to a cell through the hyperlinks collection using the `IHyperLink` interface. -SfSpreadsheet allows you to add below types of the hyperlink. +SfSpreadsheet supports the following hyperlink types: * Web URL * Cell or range in workbook @@ -250,7 +256,7 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Cell(5, 4)); //Creating a Hyperlink to refer another cell in the workbook, var range2 = spreadsheet.ActiveSheet.Range["C13"]; -IHyperLink hyperlink3 = spreadsheet.ActiveSheet.HyperLinks.Add(range); +IHyperLink hyperlink3 = spreadsheet.ActiveSheet.HyperLinks.Add(range2); hyperlink3.Type = ExcelHyperLinkType.Workbook; hyperlink3.Address = "Sheet2!C23"; hyperlink3.TextToDisplay = "Sample"; diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Find-and-Replace.md b/Document-Processing/Excel/Spreadsheet/WPF/Find-and-Replace.md index bf4656b08b..dfaa46ffcf 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Find-and-Replace.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Find-and-Replace.md @@ -9,11 +9,11 @@ documentation: ug # Find and Replace in WPF Spreadsheet (SfSpreadsheet) -This section explains about Find and Replace operations in SfSpreadsheet. +This section explains the Find and Replace operations in SfSpreadsheet. ## Find -Searches for specific data such as particular number or text according to specified options and returns an IRange representing the cell or null if no cell is found. The various options in Find operation are +Searches for specific data such as a number or text according to the specified options and returns an IRange representing the cell or null if no cell is found. The various options in Find operation are * [FindAll](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SearchManager.html#Syncfusion_UI_Xaml_Spreadsheet_SearchManager_FindAll_Syncfusion_XlsIO_IWorkbook_System_String_Syncfusion_UI_Xaml_Spreadsheet_SearchBy_Syncfusion_XlsIO_ExcelFindType_System_Boolean_System_Boolean_) * [FindNext](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SearchManager.html#Syncfusion_UI_Xaml_Spreadsheet_SearchManager_FindNext_Syncfusion_XlsIO_IWorkbook_System_String_Syncfusion_UI_Xaml_Spreadsheet_SearchBy_Syncfusion_XlsIO_ExcelFindType_System_Boolean_System_Boolean_) @@ -26,10 +26,10 @@ The common parameters to be passed in Find functions are, * The option to specify whether the search can be done within the Workbook([IWorkbook](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorkbook.html)) or Worksheet([IWorksheet](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html)). * The text to be searched. -* The option to specify the direction whether the search can be done either by row wise or column wise using [SearchBy](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SearchBy.html) enum. -* The type to specify whether the search can be done either in formulas or values using [ExcelFindType](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.ExcelFindType.html) enum. -* For a case sensitive search, pass the parameter as true otherwise you can pass the parameter as false. -* For matching the entire cell content with the search text, pass the parameter as true otherwise you can pass the parameter as false. +* The option to specify the direction whether the search can be done either row-wise or column-wise using the [SearchBy](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SearchBy.html) enum. +* The type to specify whether the search is done in formulas or values, using the [ExcelFindType](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.ExcelFindType.html) enum. +* Set to `true` for a case-sensitive search; otherwise, `false`. +* Set to `true` to match the entire cell content; otherwise, `false`. ### Find All @@ -45,7 +45,7 @@ var list = spreadsheet.SearchManager.FindAll(spreadsheet.Workbook, "sample", Sea foreach (var cell in list) { - spreadsheet. ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Cell(cell.Row, cell.Column)); + spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Cell(cell.Row, cell.Column)); } //Search the particular worksheet @@ -76,7 +76,7 @@ spreadsheet.ActiveGrid.CurrentCell.MoveCurrentCell(cell.Row,cell.Column); var cell = spreadsheet.SearchManager.FindNext(spreadsheet.Workbook.Worksheets[0], "sum", SearchBy.ByRows, ExcelFindType.Text, false, false); // To move the current cell to matched cell content range, -spreadsheet.ActiveGrid.CurrentCell.MoveCurrentCell(cell.Row,cell.Column); +spreadsheet.ActiveGrid.CurrentCell.MoveCurrentCell(cell.Row, cell.Column); {% endhighlight %} {% endtabs %} @@ -159,15 +159,15 @@ foreach (var cell in list) ## Replace All -Searches and replaces all the texts either in the workbook or worksheet based on the given option. +Searches and replaces all occurrences in the workbook or worksheet based on the given option. -The parameters to be passed in [ReplaceAll](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SearchManager.html#Syncfusion_UI_Xaml_Spreadsheet_SearchManager_ReplaceAll_Syncfusion_XlsIO_IWorkbook_System_String_System_String_System_Boolean_System_Boolean_) function is, +The parameters to be passed in the [ReplaceAll](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SearchManager.html#Syncfusion_UI_Xaml_Spreadsheet_SearchManager_ReplaceAll_Syncfusion_XlsIO_IWorkbook_System_String_System_String_System_Boolean_System_Boolean_) function are, -* The option to specify whether the search can be done within the Workbook([IWorkbook](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorkbook.html)) or Worksheet([IWorksheet](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html)) in SfSpreadsheet. +* The scope of the search: an [IWorkbook](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorkbook.html) or [IWorksheet](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html). * The text to be searched. * The text to be replaced. -* For a case sensitive search, pass the parameter as true otherwise you can pass the parameter as false. -* For matching the entire cell content with the search text, pass the parameter as true otherwise you can pass the parameter as false. +* Set to `true` for a case-sensitive search; otherwise, `false`. +* Set to `true` to match the entire cell content; otherwise, `false`. {% tabs %} {% highlight c# %} @@ -183,7 +183,7 @@ spreadsheet.SearchManager.ReplaceAll(spreadsheet.Workbook.Worksheets[0], "sample ## Replace -Searches for the text or numbers that you want to change using `FindNext` method and once the immediate matched cell has been found, use [SetCellValue](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetCellValue_Syncfusion_XlsIO_IRange_System_String_) method to replace it with specified text or numbers in SfSpreadsheet. +Searches for the text or numbers that you want to change using the `FindNext` method, and once a match is found, uses the [SetCellValue](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetCellValue_Syncfusion_XlsIO_IRange_System_String_) method to replace it with the specified text or numbers in SfSpreadsheet. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md b/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md index a8cecfa4c2..49d01b8499 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md @@ -9,7 +9,7 @@ documentation: ug # Formatting in WPF Spreadsheet (SfSpreadsheet) -This section explains about the formatting options similar to excel in SfSpreadsheet. +This section explains the formatting options available in SfSpreadsheet, similar to those in Microsoft Excel. Styles and formats defined in an Excel file are automatically imported. Users can also apply these settings to cells during run time. The following are the formatting attributes for the cell. @@ -24,19 +24,19 @@ Styles and formats defined in an Excel file are automatically imported. Users ca ## Cell Background -For applying background color for the cells at runtime in SfSpreadsheet, set the color index for the particular XlsIO range and invalidate the range in order to update the view in `SpreadsheetGrid`. +To apply a background color to cells at runtime, set the color on the XlsIO `IRange` and then invalidate the affected cells in `SpreadsheetGrid` to update the view. Use `Color` (OLE/Theme color) for new code; `ColorIndex` is retained for backward compatibility. -For single cell +For a single cell, {% tabs %} {% highlight c# %} IRange range = spreadsheet.ActiveSheet.Range["A5"]; -range.CellStyle.ColorIndex = Syncfusion.XlsIO.ExcelKnownColors.Blue; +range.CellStyle.Color = Syncfusion.XlsIO.ExcelKnownColors.Blue; spreadsheet.ActiveGrid.InvalidateCell(range.Row, range.Column); {% endhighlight %} {% endtabs %} -For selected range of cells, +For a selected range of cells, {% tabs %} {% highlight c# %} @@ -44,16 +44,16 @@ var selectedRanges = spreadsheet.ActiveGrid.SelectedRanges; foreach (var range in selectedRanges) { - string cell = GridExcelHelper.ConvertGridRangeToExcelRange(range, spreadsheet.ActiveGrid); - spreadsheet.ActiveSheet.Range[cell].CellStyle.ColorIndex = ExcelKnownColors.Blue; - spreadsheet.ActiveGrid.InvalidateCell(range, true); + string cell = GridExcelHelper.ConvertGridRangeToExcelRange(range, spreadsheet.ActiveGrid); + spreadsheet.ActiveSheet.Range[cell].CellStyle.Color = ExcelKnownColors.Blue; + spreadsheet.ActiveGrid.InvalidateCell(range, true); } {% endhighlight %} {% endtabs %} ## Font -SfSpreadsheet allows the user to apply the font settings such as font color, font name ,font size etc., for a particular cell or a range of cells. +SfSpreadsheet allows the user to apply font settings such as font color, font name, and font size to a particular cell or a range of cells. {% tabs %} {% highlight c# %} @@ -73,20 +73,20 @@ range.CellStyle.Font.Size = 18; //Setting the Font Effects, range.CellStyle.Font.Strikethrough = true; -//Setting the UnderLine Types, +//Setting the Underline Types, range.CellStyle.Font.Underline = ExcelUnderline.Single; //Setting the Font Color, range.CellStyle.Font.Color = ExcelKnownColors.Blue; -//Invalidating the range, to update in view, +//Invalidating the range to update the view, spreadsheet.ActiveGrid.InvalidateCell(gridRange, true); {% endhighlight %} {% endtabs %} ## Cell Borders -SfSpreadsheet allows the user to apply the borders at runtime for particular cell or range of cells, +SfSpreadsheet allows the user to apply borders to a particular cell or a range of cells at runtime. {% tabs %} {% highlight c# %} @@ -107,7 +107,7 @@ spreadsheet.ActiveGrid.InvalidateCell(gridRange, true); ## Cell Alignment -SfSpreadsheet allows the user to align the content of the cell. The alignment options includes Horizontal Alignment, Vertical Alignment, Indentation, Orientation etc., +SfSpreadsheet allows the user to align the content of a cell. The alignment options include horizontal alignment, vertical alignment, indentation, and orientation. {% tabs %} {% highlight c# %} @@ -119,25 +119,25 @@ spreadsheet.ActiveGrid.InvalidateCell(2,1); spreadsheet.Workbook.Worksheets[0].Range["B2"].CellStyle.VerticalAlignment = ExcelVAlign.VAlignBottom; spreadsheet.ActiveGrid.InvalidateCell(2,2); -//Applying Orientation for the selected cell or ranges, +//Applying Orientation (in degrees) for the selected cell or ranges, spreadsheet.FormatOrientation(90); //For Indentation, -//Increase the indent for the selected ranges or cell, +//Increase the indent for the selected ranges or cells by one level. spreadsheet.FormatIndent(true); -//Decrease the indent for the selected ranges or cell, +//Decrease the indent for the selected ranges or cells by one level. spreadsheet.FormatIndent(false); -//Level of indent for selected ranges or cell, +//Set the level of indent for the selected ranges or cells. spreadsheet.FormatIndentLevel(3); {% endhighlight %} {% endtabs %} ## Wrap Text -SfSpreadsheet allows the user to wrap the text in the cell, if the text is too large. +SfSpreadsheet allows the user to wrap the text in a cell when the text exceeds the cell width. {% tabs %} {% highlight c# %} @@ -153,9 +153,9 @@ spreadsheet.ActiveGrid.InvalidateCell(4, 3); ### Merge -SfSpreadsheet provides support to merge two or more cells. When a group of cells is merged, the contents of the upper-left cell will be taken as the content of the merged cell, rest will be deleted. +SfSpreadsheet provides support to merge two or more cells. When a group of cells is merged, the content of the upper-left cell becomes the content of the merged cell, and the content of the other cells is discarded. -For merging the cells in SfSpreadsheet, you need to add the [CoveredCellInfo](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.CoveredCellInfo.html) into [CoveredCells](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CoveredCells) collection of SpreadsheetGrid and merge the range using [Merge](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_Merge) method in XlsIO. Also to update the view, you need to invalidate the cells in the SpreadsheetGrid +To merge cells in SfSpreadsheet, add a [CoveredCellInfo](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.CoveredCellInfo.html) entry to the [CoveredCells](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CoveredCells) collection of `SpreadsheetGrid`, call the [Merge](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_Merge) method on the XlsIO range, and then invalidate the cells in `SpreadsheetGrid` to update the view. {% tabs %} {% highlight c# %} @@ -172,7 +172,7 @@ spreadsheet.ActiveGrid.InvalidateCell(gridRange, true); You can also unmerge the merged cells in SfSpreadsheet. -For unmerging the cells in SfSpreadsheet, you need to clear the [CoveredCells](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CoveredCells) from the SpreadsheetGrid and unmerge the range using [UnMerge](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_UnMerge) method in XlsIO. Also to update the view, you need to invalidate the cells in the SpreadsheetGrid +To unmerge cells in SfSpreadsheet, clear the [CoveredCells](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CoveredCells) entry from `SpreadsheetGrid`, call the [UnMerge](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_UnMerge) method on the XlsIO range, and then invalidate the cells in `SpreadsheetGrid` to update the view. {% tabs %} {% highlight c# %} @@ -186,7 +186,7 @@ spreadsheet.ActiveGrid.InvalidateCell(gridRange, true); ## Number Format -SfSpreadsheet allows the user to view the numbers in the cells with different formats which includes currency, percentage, datetime, scientific etc., +SfSpreadsheet allows the user to display numbers in the cells with different formats, including currency, percentage, date/time, and scientific. {% tabs %} {% highlight c# %} @@ -197,7 +197,7 @@ spreadsheet.ActiveGrid.InvalidateCell(3,3); //Applying Date format for the selected ranges at runtime, spreadsheet.Workbook.ActiveSheet.Range["D1"].NumberFormat = "m/d/yyyy"; spreadsheet.ActiveGrid.InvalidateCell(1,4); - + //Applying Time format for the selected ranges at runtime, spreadsheet.Workbook.ActiveSheet.Range["D4"].NumberFormat = "[$-F400]h:mm:ss AM/PM"; spreadsheet.ActiveGrid.InvalidateCell(3,4); @@ -205,10 +205,10 @@ spreadsheet.ActiveGrid.InvalidateCell(3,4); //Applying Text format for the selected ranges at runtime, spreadsheet.Workbook.ActiveSheet.Range["D5"].NumberFormat = "@"; spreadsheet.ActiveGrid.InvalidateCell(4,4); - {% endhighlight %} +{% endhighlight %} {% endtabs %} -The different types of number formats with its notation are +The different types of number formats with their notation are: @@ -263,7 +263,7 @@ m/d/yyyy ## Built-in Styles -SfSpreadsheet supports some predefined built in styles of XlsIO. [BuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.BuiltInStyles.html) is an enum which contains different styles for formatting a cell or range of cells. +SfSpreadsheet supports the predefined built-in styles provided by XlsIO. [BuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.BuiltInStyles.html) is an enum that contains different styles for formatting a cell or range of cells. Common values include `Heading1`, `Heading2`, `Heading3`, `Title`, `Total`, `Accent1`, and `Accent2`. {% tabs %} {% highlight c# %} @@ -274,33 +274,33 @@ spreadsheet.ActiveGrid.InvalidateCell(3, 1); ## Format as Table -SfSpreadsheet allows the users to format a table with built in styles of table (i.e.) [TableBuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.TableBuiltInStyles.html) of XlsIO +SfSpreadsheet allows the user to format a range as a table using the built-in table styles provided by XlsIO via [TableBuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.TableBuiltInStyles.html). This applies a `ListObject` with filter, sort, and structured-reference capabilities, which is different from applying a built-in cell style (see the previous section). {% tabs %} {% highlight c# %} // Creating a table IListObject table = spreadsheet.Workbook.ActiveSheet.ListObjects.Create("Table1", spreadsheet.Workbook.ActiveSheet.Range["C1:G5"]); -// Formatting table with a built-in style +// Formatting the table with a built-in style table.BuiltInTableStyle = TableBuiltInStyles.TableStyleLight6; spreadsheet.ActiveGrid.InvalidateCells(); {% endhighlight %} {% endtabs %} -For more information regarding formatting options, please go through [XlsIO](https://help.syncfusion.com/file-formats/xlsio/working-with-cell-or-range-formatting) +For more information regarding formatting options, please go through [XlsIO](https://help.syncfusion.com/file-formats/xlsio/working-with-cell-or-range-formatting). N> Users need to [refresh the view](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/working-with-sfspreadsheet#refreshing-the-view) after the formatting is applied on the XlsIO range to update the styles in `SpreadsheetGrid`. ## Clear formatting -SfSpreadsheet provides support to clear the contents of a cell along with its formatting or by specifying the required clear options using [ExcelClearOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.ExcelClearOptions.html) enum which specifies the possible directions to clear the cell formats, content, comments,conditional format,data validation or clear all of them. +SfSpreadsheet provides support for clearing the contents of a cell along with its formatting, or for clearing specific items using the [ExcelClearOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.ExcelClearOptions.html) enum. The enum controls which elements are removed, including formats, content, comments, conditional formats, data validation, or a combination of any of them. The `Clear(true)` overload clears contents together with formatting, while `Clear(false)` clears only the contents. {% tabs %} {% highlight c# %} //To clear the contents along with its formatting in the range, spreadsheet.Workbook.Worksheets[0].Range[4, 5].Clear(true); -//To clear the range with specified ExcelClearOptions, +//To clear only the conditional formats in the range, spreadsheet.Workbook.Worksheets[0].Range[4, 5].Clear(ExcelClearOptions.ClearConditionalFormats); {% endhighlight %} {% endtabs %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md b/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md index 1169386d3c..d303a41c62 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md @@ -11,7 +11,7 @@ documentation: ug SfSpreadsheet calculation engine offers automated calculation over a formula, expression, or cross sheet references. SfSpreadsheet calculation engine is preloaded with 409 formulas covering a broad range of business functions. -## Adding Formula into cell +## Adding a Formula to a Cell To add formulas into a cell programmatically, use [SetCellValue](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetCellValue_Syncfusion_XlsIO_IRange_System_String_) method of [SpreadsheetGrid](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) should be invoked and then invalidate that cell to update the view. @@ -25,7 +25,7 @@ spreadsheet.ActiveGrid.InvalidateCell(2,1); ## Named Ranges -Named Ranges are the defined names that represents a cell, range of cells, formula, or constant value or table. Each name have a scope of either to a specific worksheet or to the entire workbook. +Named Ranges are the defined names that represents a cell, range of cells, formula, or constant value or table. Each name has a scope of either to a specific worksheet or to the entire workbook. ### Define named ranges at runtime @@ -55,7 +55,7 @@ spreadsheet.DeleteNamedRange(name); ## ExcelLikeComputations -To return the result of formula computations of Essential® Calculate like Microsoft Excel computational result, this bool property [ExcelLikeComputations](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.FormulaEngine.html#Syncfusion_UI_Xaml_CellGrid_FormulaEngine_ExcelLikeComputations) is set to true. +To make formula computations match Microsoft Excel's behavior, set the bool property [ExcelLikeComputations](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.FormulaEngine.html#Syncfusion_UI_Xaml_CellGrid_FormulaEngine_ExcelLikeComputations) is set to true. {% tabs %} {% highlight c# %} @@ -248,8 +248,8 @@ DEC2BIN

+DEC2OCT

+Converts a binary number to a decimal

+Calculates a complex number raised to a supplied exponent

+Checks whether the value is not text and returns true or false (returns false for blank cells)

+Returns information about the current operating environment

+Tests a number of user-defined conditions and returns TRUE if ALL of the conditions evaluate to TRUE, or FALSE otherwise

+Tests a number of user-defined conditions and returns TRUE if ANY of the conditions evaluate to TRUE, or FALSE otherwise

< +Converts a number into a text representation

+Returns the rank of a value in a data set, as a percentage (0 - 1 inclusive) of the data set

+Returns the statistical rank of a given value, within a supplied array of values (if more than one value has the same rank, the average rank is returned)

+Returns the statistical rank of a given value, within a supplied array of values (if more than one value has the same rank, the top rank of that set is returned)

+Returns the rank of a supplied number, within a supplied list of numbers (if more than one value has the same rank, the top rank of that set is returned)

+Returns the position of a supplied character or text string from within a supplied text string (case-insensitive)

+Occurs when the workbook is loaded in SfSpreadsheet. +Occurs when columns are resized in SfSpreadsheet. +Occurs when rows are resized in SfSpreadsheet. +Occurs when a cell comment is opened in SfSpreadsheet. +Occurs when a cell tooltip is opened in SfSpreadsheet. +Occurs when the context menu of a cell is opened in SfSpreadsheet. +Occurs when the grid queries for IRange information about a specific cell while rendering.
Converts a decimal number to binary

-DCE2OCT

-Converts a binary number to octal

+Converts a decimal number to octal

DEC2HEX

@@ -257,7 +257,7 @@ Converts a decimal number to hexadecimal

BIN2DEC

-Converts a binary number to hexadecimal

BIN2OCT

@@ -393,7 +393,7 @@ Returns the exponential of a complex number

IMPOWER

-Calculates a complex number raised to a supplied power

GESTEP

@@ -611,7 +611,7 @@ Checks whether the value is text and returns true or false

ISNONTEXT

-Checks whether the value is not text(blank cells are not text) and returns true or false

ISEVEN

@@ -655,7 +655,7 @@ Returns information about the contents, formatting or location of a given cell INFO

-Returns information about the the current operating environment

TYPE

@@ -676,11 +676,11 @@ Description

AND

-Tests a number of user-defined conditions and returns TRUE if ALL of the conditions evaluate to TRUE, orFALSE otherwise

OR

-Tests a number of user-defined conditions and returns TRUE if ANY of the conditions evaluate to TRUE, orFALSE otherwise

IF

@@ -1066,7 +1066,7 @@ Returns the number of combinations for a given number of objects

BASE

-Converts number into text representation

DECIMAL

@@ -1163,7 +1163,7 @@ Returns the rank of value in dataset as a percentage of the data set as percenta
PERCENTRANC.INC

-Returns the rank of value in dataset as a percentage of the data set as percentage (0….1, inclusive) of the dataset

STDEV.P

@@ -1275,11 +1275,11 @@ Returns the one-tailed probability value of a z-test

RANK.AVG

-Returns the statistical rank of a given value, within a supplied array of values (if more than one value has same rank, the average rank is returned)

RANK.EQ

-Returns the Mode (the most frequently occurring value) of a list of supplied numbers (if more than one value has same rank, the top rank of that set is returned)

NEGBINOM.DIST

@@ -1479,7 +1479,7 @@ Returns the specified quartile of a set of supplied numbers, based on percentile
RANQ

-Returns the Mode (the most frequently occurring value) of a list of supplied numbers (if more than one value has same rank, the top rank of that set is returned)

RSQ

@@ -1660,7 +1660,7 @@ Returns a string consisting of a supplied text string, repeated a specified numb
SEARCHB

-Returns the position of a supplied character or text string from within a supplied text string (non-case-sensitive)

UNICHAR

diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md b/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md index 8028074d26..3b36454438 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md @@ -9,13 +9,13 @@ documentation: ug # Interactive Features in WPF Spreadsheet (SfSpreadsheet) - This section explains about the interactive operations with SfSpreadsheet + This section explains the interactive operations available with SfSpreadsheet. ## Clipboard Operations -SfSpreadsheet provides support for all the clipboard operations to with all the format settings when copied within a workbook. +SfSpreadsheet provides support for all the clipboard operations with all the format settings when copied within a workbook. -You can use the following shortcut keys for Clipboard operations like Excel +You can use the following shortcut keys for clipboard operations like Microsoft Excel
@@ -35,7 +35,7 @@ Paste Ctrl + V
-The following are a list of paste options used while performing paste operation, +The following is a list of paste options used while performing a paste operation: @@ -68,13 +68,13 @@ Value & Source Formatting
To maintain the source range original format and paste only values
-N> When the content is copied from external source, SfSpreadsheet does not support the format settings (paste options). +N> When the content is copied from an external source, SfSpreadsheet does not support the format settings (paste options). -For [Cut](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_Cut) Operation, +For the [Cut](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_Cut) operation, {% tabs %} {% highlight c# %} -//To perform cut operation for selected ranges +// To cut the currently selected range var range = spreadsheet.ActiveGrid.SelectedRanges.ActiveRange; spreadsheet.ActiveGrid.CopyPaste.Copy(range, true); @@ -83,11 +83,11 @@ spreadsheet.ActiveGrid.CopyPaste.Cut(); {% endhighlight %} {% endtabs %} -For [Copy](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_Copy) Operation, +For the [Copy](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_Copy) operation, {% tabs %} {% highlight c# %} -//To perform copy operation for selected ranges +// To copy the currently selected range var range = spreadsheet.ActiveGrid.SelectedRanges.ActiveRange; spreadsheet.ActiveGrid.CopyPaste.Copy(range, false); @@ -96,32 +96,32 @@ spreadsheet.ActiveGrid.CopyPaste.Copy(); {% endhighlight %} {% endtabs %} -For [Paste](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_Paste) Operation, +For the [Paste](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_Paste) operation, {% tabs %} {% highlight c# %} -//To perform paste operation +// To perform the paste operation spreadsheet.ActiveGrid.CopyPaste.Paste(); -//To perform paste operation with range and Paste Options +// To perform the paste operation with a specific range and PasteOptions var copyPaste = spreadsheet.ActiveGrid.CopyPaste as SpreadsheetCopyPaste; copyPaste.Paste(range); copyPaste.Paste(range, PasteOptions.Paste); {% endhighlight %} {% endtabs %} -T> Users can also set their default [PasteOptions](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.PasteOptions.html) while pasting in SfSpreadsheet, by using [DefaultPasteOption](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_DefaultPasteOption) property. +T> Users can also set their default [PasteOptions](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.PasteOptions.html) when pasting in SfSpreadsheet by using the [DefaultPasteOption](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetCopyPaste.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetCopyPaste_DefaultPasteOption) property. ## Undo/Redo SfSpreadsheet provides support for Undo/Redo functionality like Microsoft Excel. -The shortcut keys used for Undo/Redo Operations +The shortcut keys used for undo/redo operations are listed below.
-Operations +Operation Shortcut Keys
@@ -133,9 +133,9 @@ Redo Ctrl + Y
-SfSpreadsheet has [History Manager](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.History.HistoryManager.html) class that supports the implementation of undo/ redo operations +SfSpreadsheet includes the [HistoryManager](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.History.HistoryManager.html) class, which supports the implementation of undo/redo operations. -By default, Undo/Redo operations in SfSpreadsheet is enabled. To disable the Undo/Redo operations, set the [Enabled](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.History.HistoryManager.html#Syncfusion_UI_Xaml_Spreadsheet_History_HistoryManager_Enabled) property of [History Manager](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.History.HistoryManager.html) to be false. +By default, undo/redo operations in SfSpreadsheet are enabled. To disable undo/redo, set the [Enabled](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.History.HistoryManager.html#Syncfusion_UI_Xaml_Spreadsheet_History_HistoryManager_Enabled) property of the [HistoryManager](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.History.HistoryManager.html) to false. {% tabs %} {% highlight c# %} @@ -143,7 +143,7 @@ spreadsheet.HistoryManager.Enabled = false; {% endhighlight %} {% endtabs %} -To programmatically, invoke the Undo/Redo operations, +To programmatically invoke undo/redo operations, {% tabs %} {% highlight c# %} @@ -153,13 +153,13 @@ spreadsheet.HistoryManager.Redo(); {% endhighlight %} {% endtabs %} -## Context menu +## Context Menu -Context menu in SfSpreadsheet is customizable menu which can be used for various functionalities +The context menu in SfSpreadsheet is a customizable menu that can be used for various functionalities. -### TabItem Context menu +### TabItem Context Menu -TabItem Context menu opens when the user right-click on the sheet tab and contains the menus related to worksheet operations. +The TabItem context menu opens when the user right-clicks on the sheet tab and contains menus related to worksheet operations. By default, TabItem Context menu is enabled in SfSpreadsheet. To disable the TabItem context menu, set the [AllowTabItemContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_AllowTabItemContextMenu) property to false. @@ -169,15 +169,14 @@ spreadsheet.AllowTabItemContextMenu = false; {% endhighlight %} {% endtabs %} -Default TabItem context menu has options like Insert, Delete, Hide/Unhide and Protect sheet. You can also customize the TabItem Context menu by setting [IsCustomTabItemContextMenuEnabled](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_IsCustomTabItemContextMenuEnabled) property to be true and you can add your customized menu items. +By default, the TabItem context menu has options such as Insert, Delete, Hide/Unhide, and Protect Sheet. You can also customize the TabItem context menu by setting the [IsCustomTabItemContextMenuEnabled](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_IsCustomTabItemContextMenuEnabled) property to true and assigning your own context menu. {% tabs %} {% highlight c# %} spreadsheet.IsCustomTabItemContextMenuEnabled = true; spreadsheet.TabItemContextMenu = CustomTabItemContextMenu(); -//Custom TabItem ContextMenus - +// Custom TabItem context menu public ContextMenu CustomTabItemContextMenu() { var contextMenu = new ContextMenu(); @@ -187,7 +186,7 @@ public ContextMenu CustomTabItemContextMenu() insertRow.Click += insertRow_Click; var deleteRowIcon = new Image() { Source = new BitmapImage(new Uri(@"..\..\Icon\deleteRow.png", UriKind.Relative)) }; - var deleteRow = new MenuItem() { Header = "DeleteRow"}; + var deleteRow = new MenuItem() { Header = "DeleteRow" }; deleteRow.Icon = deleteRowIcon; deleteRow.Click += deleteRow_Click; @@ -200,9 +199,9 @@ public ContextMenu CustomTabItemContextMenu() ### Cell Context menu -Cell Context menu opens when the user right-click on a worksheet cell or selection of cells in SfSpreadsheet. +The cell context menu opens when the user right-clicks on a worksheet cell or selection of cells in SfSpreadsheet. -By default, Cell Context menu is enabled in SfSpreadsheet. To disable the Cell Context menu, set the [AllowCellContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_AllowCellContextMenu) property as false. +By default, the cell context menu is enabled in SfSpreadsheet. To disable the cell context menu, set the [AllowCellContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_AllowCellContextMenu) property to false. {% tabs %} {% highlight c# %} @@ -210,9 +209,9 @@ spreadsheet.AllowCellContextMenu = false; {% endhighlight %} {% endtabs %} -Users can also customize the Cell Context menu of SfSpreadsheet by using [CellContextMenuOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) Event of `SpreadsheetGrid`. +You can also customize the cell context menu of SfSpreadsheet by using the [CellContextMenuOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) event of `SpreadsheetGrid`. This event fires when the cell context menu is about to be displayed, letting you add, modify, or remove items. -Adding the customized menu items in the CellContextMenuOpening Event, +To add customized menu items via the `CellContextMenuOpening` event, {% tabs %} {% highlight c# %} @@ -220,26 +219,26 @@ spreadsheet.ActiveGrid.CellContextMenuOpening += ActiveGrid_CellContextMenuOpeni void ActiveGrid_CellContextMenuOpening(object sender, CellContextMenuOpeningEventArgs e) { - //Adding Customized Menu item + // Add a customized menu item MenuItem PasteSpecial = new MenuItem(); PasteSpecial.Header = "Pastespecial"; Image paste = new Image() { Source = new BitmapImage(new Uri(@"..\..\Icon\paste.png", UriKind.Relative)) }; PasteSpecial.Icon = paste; spreadsheet.ActiveGrid.CellContextMenu.Items.Add(PasteSpecial); - //Remove the existing Context menu + // Remove the existing context menu item at index 2 spreadsheet.ActiveGrid.CellContextMenu.Items.RemoveAt(2); } {% endhighlight %} {% endtabs %} -T> Custom Cell Context menu can also by added by assigning the customized menu items to the [CellContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CellContextMenu) property of `SpreadsheetGrid`. For your reference, [CustomContextMenu](https://www.syncfusion.com/kb/6499/how-to-create-a-customized-cell-context-menu-of-sfspreadsheet) +T> A custom cell context menu can also be added by assigning the customized menu items to the [CellContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CellContextMenu) property of `SpreadsheetGrid`. ## Cell Comments -SfSpreadsheet provides support for cell comments like in excel to give the reader additional context for the data it contains. You can set the comment height and color for the particular comments at runtime by invoking [CellCommentOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) Event of SpreadsheetGrid +SfSpreadsheet provides support for cell comments like in Microsoft Excel, allowing you to give readers additional context about the data a cell contains. You can set the comment height and color for a particular comment at runtime by handling the [CellCommentOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) event of `SpreadsheetGrid`. -To enable the comment in SfSpreadsheet, set the [ShowComment](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_ShowComment) property of SpreadsheetGrid to true. +To enable comments in SfSpreadsheet, set the [ShowComment](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_ShowComment) property of `SpreadsheetGrid` to true. {% tabs %} {% highlight c# %} @@ -247,7 +246,7 @@ spreadsheet.ActiveGrid.ShowComment = true; {% endhighlight %} {% endtabs %} -To set the comments for particular cell at run time, +To set a comment for a particular cell at run time, {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Limitations.md b/Document-Processing/Excel/Spreadsheet/WPF/Limitations.md index e67937b6d0..872aa0cdc4 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Limitations.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Limitations.md @@ -11,7 +11,7 @@ documentation: ug ## Release memory held by AutomationPeer -SfSpreadsheet holds some instance in memory even after disposing the spreadsheet or removed the sheets from the spreadsheet. Because, the **AutomationPeer** for WPF Components holds some memory and it needs to be released manually. This can be done by using the following steps. +SfSpreadsheet retains an instance in memory even after the spreadsheet is disposed or its sheets are removed. This happens because the WPF **AutomationPeer** holds memory that must be released manually. Use the following steps to release it. Create a class derived from `WindowAutomationPeer` and override it's `GetChildrenCore` method and returns “null” value that clears the **AutomationPeer** item from memory as follows @@ -37,7 +37,6 @@ Now override the `OnCreateAutomationPeer` of the window and it returns th {% highlight c# %} public partial class MainWindow : Window { - public MainWindow() { InitializeComponent(); @@ -51,5 +50,4 @@ public partial class MainWindow : Window {% endhighlight %} {% endtabs %} - -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +N> For more information, see the [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour and the [WPF Spreadsheet demos](https://github.com/syncfusion/wpf-demos). diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Localization.md b/Document-Processing/Excel/Spreadsheet/WPF/Localization.md index 00533eb04a..b376fdebf0 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Localization.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Localization.md @@ -9,9 +9,9 @@ documentation: ug # Localization in WPF Spreadsheet (SfSpreadsheet) -Localization is the process of configuring the application to a specific language. SfSpreadsheet provides support to localize all the static text in a Ribbon and all dialogs to any desired language. Localization can be done by adding resource file and setting the specific culture in the application. +SfSpreadsheet provides support to localize all the static text in the Ribbon and in all dialogs to any desired language. Localization can be done by adding a resource file and setting the specific culture in the application. -SfSpreadsheet allows you to set custom resource using Resx file. You can define your string values in resource file for a specific culture and set the culture in your application. +SfSpreadsheet allows you to set a custom resource using a RESX file. You can define your string values in the resource file for a specific culture and set the culture in your application. ## Set Current UI Culture to the Application @@ -29,13 +29,13 @@ public MainWindow() {% endhighlight %} {% endtabs %} -Now, the Application is set to the Japanese Culture info. +The application now uses the Japanese culture. -## Localization using Resource file +## Localization Using Resource File -The following steps show how to implement the localization in SfSpreadsheet, +The following steps show how to implement localization in SfSpreadsheet: -* Create a folder and name it as ‘Resources’ in your application. +* Create a folder named **Resources** in your application. * Add the default resource[English("en-US")] file of `SfSpreadsheet` in the 'Resources' folder named as Syncfusion.SfSpreadsheet.WPF.resx. You can download the Resx file [here](https://github.com/syncfusion/wpf-controls-localization-resx-files/blob/master/Syncfusion.SfSpreadsheet.WPF/Syncfusion.SfSpreadsheet.Wpf.resx) * Create Resx(resource) file under the 'Resources' folder and name it as Syncfusion.SfSpreadsheet.WPF.[Culture name].resx. @@ -48,24 +48,23 @@ The following steps show how to implement the localization in SfSpreadsheet, ![WPF Spreadsheet Localization with Resource Key](localization_images/wpf-spreadsheet-localization-with-resource-key.JPG) -The following screenshot shows you the localization in SfSpreadsheet, +The following screenshot shows the localization in SfSpreadsheet: ![WPF Spreadsheet Localization](localization_images/wpf-spreadsheet-localization.jpg) -## Modifying the localized strings in Resource file +## Modifying the Localized Strings in Resource File -Users can modify the default localized strings in Resource file by adding the default [Resx](https://github.com/syncfusion/wpf-controls-localization-resx-files/blob/master/Syncfusion.SfSpreadsheet.WPF/Syncfusion.SfSpreadsheet.Wpf.resx) (resource) file of `SfSpreadsheet` in the 'Resources' folder of your application and name it as Syncfusion.SfSpreadsheet.WPF.resx. +The default resource strings shipped with `SfSpreadsheet` can be customized by adding the default [resx](https://github.com/syncfusion/wpf-controls-localization-resx-files/blob/master/Syncfusion.SfSpreadsheet.WPF/Syncfusion.SfSpreadsheet.Wpf.resx) (resource) file of `SfSpreadsheet` to the **Resources** folder of your application and naming it `Syncfusion.SfSpreadsheet.WPF.resx`. -Now, the default localized strings can be modified by changing the Name/Value pair in the Syncfusion.SfSpreadsheet.WPF.resx file. +The default strings can then be modified by changing the **Name**/**Value** pair in the `Syncfusion.SfSpreadsheet.WPF.resx` file. ![WPF Spreadsheet Localized using Resource String](localization_images/wpf-spreadsheet-localized-using-resource-string.jpg) - N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. -## Localize when the resource file is present in a different assembly or different namespace +## Localization from a Different Assembly or Namespace -[WPF-Spreadsheet](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/getting-started) (SfSpreadsheet) reads the localization resource files based on the assembly name from its default namespace. If you have the localization resource file other than the executing assembly (Assembly.GetExecutingAssembly())or other than the default namespace, then you have to pass the assembly having the resource file and its default namespace to [GridResourceWrapper.SetResources](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Resources.GridResourceWrapper.html#Syncfusion_UI_Xaml_Spreadsheet_Resources_GridResourceWrapper_SetResources_System_Reflection_Assembly_System_String_) method. +[WPF-Spreadsheet](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/getting-started) (SfSpreadsheet) reads the localization resource files based on the assembly name from its default namespace. If the localization resource file is in an assembly other than the executing assembly (`Assembly.GetExecutingAssembly()`) or in a different namespace, you must pass the assembly that contains the resource file and its default namespace to the [GridResourceWrapper.SetResources](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Resources.GridResourceWrapper.html#Syncfusion_UI_Xaml_Spreadsheet_Resources_GridResourceWrapper_SetResources_System_Reflection_Assembly_System_String_) method. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Outline.md b/Document-Processing/Excel/Spreadsheet/WPF/Outline.md index 872f1651f7..a11e19990f 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Outline.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Outline.md @@ -7,79 +7,81 @@ control: SfSpreadsheet documentation: ug --- -# Outline in WPF Spreadsheet (SfSpreadsheet) +# Outlines in WPF Spreadsheet (SfSpreadsheet) -SfSpreadsheet provides support for outlines like in excel which makes your data easier to view. You can group or ungroup the data’s either by rows or columns. +SfSpreadsheet provides support for Excel-style outlines that make your data easier to view and analyze. You can group or ungroup data by rows or columns, expand or collapse grouped sections, and configure summary-row and summary-column positions. ## Group rows and columns -SfSpreadsheet provides support to group the specified range in a worksheet. +SfSpreadsheet supports grouping a specified range of rows or columns in a worksheet. The `ExcelGroupBy` enum accepts `ByRows` or `ByColumns` to indicate the grouping direction. -To [Group](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Group_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows/columns +To [Group](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Group_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows: {% tabs %} {% highlight c# %} //Group rows, -var gridRange = GridRangeInfo.Rows(4,8); +var gridRange = GridRangeInfo.Rows(4, 8); spreadsheet.Group(spreadsheet.ActiveSheet, gridRange, ExcelGroupBy.ByRows); //Group columns, -var gridRange = GridRangeInfo.Cols(4,8); +var gridRange = GridRangeInfo.Cols(4, 8); spreadsheet.Group(spreadsheet.ActiveSheet, gridRange, ExcelGroupBy.ByColumns); {% endhighlight %} {% endtabs %} ## Ungroup rows and columns -SfSpreadsheet provides support to ungroup the specified range in a worksheet. +SfSpreadsheet supports ungrouping a previously grouped range of rows or columns. -To [Ungroup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_UnGroup_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows/columns +To [Ungroup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_UnGroup_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows: {% tabs %} {% highlight c# %} //Ungroup rows, -var gridRange = GridRangeInfo.Rows(4,8); +var gridRange = GridRangeInfo.Rows(4, 8); spreadsheet.UnGroup(spreadsheet.ActiveSheet, gridRange, ExcelGroupBy.ByRows); //Ungroup columns, -var gridRange = GridRangeInfo.Cols(4,8); +var gridRange = GridRangeInfo.Cols(4, 8); spreadsheet.UnGroup(spreadsheet.ActiveSheet, gridRange, ExcelGroupBy.ByColumns); {% endhighlight %} {% endtabs %} -## Collapse or Expand Group +## Collapse or expand group -Groups can be Expanded by [ExpandGroup](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_ExpandGroup_Syncfusion_XlsIO_ExcelGroupBy_) method and Collapsed by [CollapseGroup](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_CollapseGroup_Syncfusion_XlsIO_ExcelGroupBy_) method of `XlsIO`. +Groups can be expanded by the [ExpandGroup](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_ExpandGroup_Syncfusion_XlsIO_ExcelGroupBy_) method and collapsed by the [CollapseGroup](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_CollapseGroup_Syncfusion_XlsIO_ExcelGroupBy_) method of XlsIO. After toggling the state, use the SfSpreadsheet `RowHeights.SetHidden` / `ColumnWidths.SetHidden` methods to update the visual hide state, and call `RefreshOutlines` to repaint the outline indicators. + +### Expand group {% tabs %} {% highlight c# %} -//Expand Rows, +//Expand rows, spreadsheet.ActiveSheet.Range["A4:A8"].ExpandGroup(ExcelGroupBy.ByRows); spreadsheet.ActiveGrid.RowHeights.SetHidden(4, 8, false); -spreadsheet.RefreshOutlines(true,false); +spreadsheet.RefreshOutlines(true, false); -//Expand Columns, +//Expand columns, spreadsheet.ActiveSheet.Range["A3:F3"].ExpandGroup(ExcelGroupBy.ByColumns); spreadsheet.ActiveGrid.ColumnWidths.SetHidden(1, 6, false); -spreadsheet.RefreshOutlines(false,true); +spreadsheet.RefreshOutlines(false, true); -//Collapse Rows, +//Collapse rows, spreadsheet.ActiveSheet.Range["A4:A8"].CollapseGroup(ExcelGroupBy.ByRows); spreadsheet.ActiveGrid.RowHeights.SetHidden(4, 8, true); -spreadsheet.RefreshOutlines(true,false); +spreadsheet.RefreshOutlines(true, false); -//Collapse Columns, +//Collapse columns, spreadsheet.ActiveSheet.Range["A3:F3"].CollapseGroup(ExcelGroupBy.ByColumns); spreadsheet.ActiveGrid.ColumnWidths.SetHidden(1, 6, true); -spreadsheet.RefreshOutlines(false,true); +spreadsheet.RefreshOutlines(false, true); {% endhighlight %} {% endtabs %} -N> [RefreshOutlines](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RefreshOutlines_System_Boolean_System_Boolean_) method is invoked to refresh/update the Outlines of the Group in SfSpreadsheet. +> The [RefreshOutlines](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RefreshOutlines_System_Boolean_System_Boolean_) method refreshes and updates the outline indicators in SfSpreadsheet. Its first parameter refreshes row outlines; the second refreshes column outlines. -## Change Outline Settings +## Change outline settings -In SfSpreadsheet, users can change the outline settings by changing the display of summary rows to either below or above the details and summary columns to either left or right of the details in Outlines Group. +In SfSpreadsheet, you can change the position of summary rows to appear below or above the detail rows, and summary columns to appear to the left or right of the detail columns. This is useful, for example, in accounting-style reports where totals appear at the top of a group. {% tabs %} {% highlight c# %} @@ -88,10 +90,10 @@ spreadsheet.ActiveSheet.PageSetup.IsSummaryColumnRight = false; spreadsheet.RefreshOutlines(true, true); {% endhighlight %} {% endtabs %} - -## Clear Outlines -SfSpreadsheet provides support to clear all the Outlines of the Grouped range. +## Clear outlines + +SfSpreadsheet supports clearing all outlines from a grouped range. {% tabs %} {% highlight c# %} @@ -99,11 +101,10 @@ var sheet = spreadsheet.Workbook.Worksheets[0] as WorksheetImpl; foreach (OutlineWrapper outline in sheet.OutlineWrappers) { - outline.OutlineRange.Ungroup(outline.GroupBy); + outline.OutlineRange.Ungroup(outline.GroupBy); } spreadsheet.RefreshOutlines(true, true); {% endhighlight %} {% endtabs %} - -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +N> Refer to the [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page to explore the Spreadsheet's capabilities. You can also browse the [WPF Spreadsheet demos](https://github.com/syncfusion/wpf-demos) to see how to render and configure the Spreadsheet in an application. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Overview.md b/Document-Processing/Excel/Spreadsheet/WPF/Overview.md index 6f610a73d0..23e34cbcc4 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Overview.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Overview.md @@ -9,7 +9,7 @@ documentation: ug # WPF Spreadsheet (SfSpreadsheet) Overview -The [WPF Spreadsheet (SfSpreadsheet)](https://www.syncfusion.com/spreadsheet-editor-sdk/wpf-spreadsheet-editor) is excel inspired control that allows you to create, edit, view and format the Microsoft Excel files without excel installed. It provides absolute ease of use UI experience with integrated ribbon to cover any possible business scenario. SfSpreadsheet comes with built-in calculation engine with support for 400+ most widely used formulas. +The [WPF Spreadsheet (SfSpreadsheet)](https://www.syncfusion.com/spreadsheet-editor-sdk/wpf-spreadsheet-editor) is an Excel-inspired control that lets you create, edit, view, and format Microsoft Excel files without Excel installed. It provides a polished UI with an integrated ribbon to cover any possible business scenario. SfSpreadsheet includes a built-in calculation engine that supports 400+ widely used formulas. ![SfSpreadsheet](Overview-image\wpf-spreadsheet-overview-image.png) @@ -17,55 +17,55 @@ The [WPF Spreadsheet (SfSpreadsheet)](https://www.syncfusion.com/spreadsheet-edi ## Key Features -* **[Ribbon](ribbon-customization)** – Ribbon integrated with organically enhanced UI experience. +* **[Ribbon](ribbon-customization)** – A fully featured ribbon with an enhanced UI experience. -* **[Editing](editing)** **and** **[Selection](selection)**- Interactive support for editing and cell selection in workbook. +* **[Editing](editing)** **and** **[Selection](selection)** – Interactive support for editing and cell selection in the workbook. -* **[Formulas](formulas)** - Provides support for 400+ most widely used formulas which any business user needs and allows you to add, remove and edit the formulas like in excel. +* **[Formulas](formulas)** – Provides support for 400+ widely used formulas that any business user needs, and lets you add, remove, and edit them like in Excel. -* **[Name Manager](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/formulas#named-ranges)** – Supports the name ranges in the formulas. By using the name ranges, you can specify the name of the cell range, and then you can use it in the formula more easily without hassling of remembering cell locations. +* **[Name Manager](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/formulas#named-ranges)** – Supports the name ranges in the formulas. By using named ranges, you can assign a name to a cell range and then use it in formulas without the hassle of remembering cell locations. -* **[Data validation](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/editing#data-validation)** – Provides support to ensure the data integrity by enforcing end users to enter valid data into the cells and if entered data does not meet the specified criteria, and error message is displayed. +* **[Data validation](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/editing#data-validation)** – Ensures data integrity by requiring end users to enter valid data. If the entered data does not meet the specified criteria, an error message is displayed. -* **Floating Cells**- Provides support for floating cell mode that is when the text exceeds the length of the cell, it will float the text to the adjacent cell. +* **Floating Cells** – Supports floating cell mode where text that exceeds the cell width flows into the adjacent cell. -* **[Merge Cells](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/formatting#merge-cells)** - Merge two or more adjacent cells into a single cell and display the contents of one cell in the merged cell. +* **[Merge Cells](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/formatting#merge-cells)** – Merges two or more adjacent cells into a single cell that displays the contents of one cell in the merged range. -* **[Conditional Formatting](conditional-formatting)**- Provides support for excel compatible conditional formatting and allows you to apply formats to a cell or range of cells depending on the value of cells or formula that meet specific criteria. Also provides support to define and import the conditional formatting. rules such as Data Bars, Icon Sets and Color Scales options which are used to visualize the data. +* **[Conditional Formatting](conditional-formatting)** – Provides Excel-compatible conditional formatting and lets you apply formats to a cell or range of cells based on cell values or formulas that meet specific criteria. Also supports defining and importing conditional formatting rules such as Data Bars, Icon Sets, and Color Scales to visualize the data. -* **[Cell Comments](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/interactive-features#cell-comments)**- Supports comments that provide additional information about a cell such as what the value represents. And it would be useful if you want the end users to understand the data in the cells more deeply. +* **[Cell Comments](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/interactive-features#cell-comments)** – Supports comments that provide additional information about a cell, such as what the value represents. Useful for helping end users understand the data in cells more deeply. -* **[Hyperlinks and Bookmarks](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/editing#hyperlink)**- Provides support to import, create, and edit hyperlinks and bookmarks. The hyperlink is a convenient way to navigate or browse data within a worksheet or other worksheets in a workbook. +* **[Hyperlinks and Bookmarks](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/editing#hyperlink)** – Supports importing, creating, and editing hyperlinks and bookmarks. A hyperlink is a convenient way to navigate or browse data within a worksheet or across worksheets in a workbook. -* **[Undo/Redo](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/interactive-features#undoredo)** - Provides support to undo or redo the changes that you have made in the workbook. +* **[Undo/Redo](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/interactive-features#undoredo)** – Provides support to undo or redo the changes made in the workbook. -* **[Clipboard Operations](Interactive-Features)** – Provides support for Cut/Copy/Paste Operations in Spreadsheet. +* **[Clipboard Operations](Interactive-Features)** – Provides support for cut, copy, and paste operations in the Spreadsheet. * **[Fill Series](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/editing#fill-neighboring-cells-with-formula-or-data)** – Provides support to automatically fill cells with data that follows or completes a pattern. -* **[Freeze panes](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/rows-and-columns#freeze-rows-and-columns)** – Provides support to freeze rows/columns. +* **[Freeze Panes](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/rows-and-columns#freeze-rows-and-columns)** – Provides support to freeze rows and columns. * **[Resizing and Hiding](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/rows-and-columns#hide-rows-and-columns)** – Provides interactive support to resize or hide/unhide the rows and columns. -* **[Charts, Pictures and Textboxes](shapes)** - Provides support to import Charts, Pictures and Textboxes. +* **[Charts, Pictures, and Textboxes](shapes)** – Provides support to import charts, pictures, and textboxes. * **[Sparklines](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/shapes#sparklines)** – Provides support to import Sparklines. -* **[Outlines](Outline)** - Provides support to group or ungroup rows and columns. +* **[Outlines](Outlines)** – Provides support to group or ungroup rows and columns. -* **[Workbook and Worksheet Protection](worksheet-management)**- Provides support to protect the worksheet and also supports to lock-down the structure and window of workbook, which enables you to prevent workbook from any structural change or from any change in size. +* **[Workbook and Worksheet Protection](worksheet-management)** – Supports protecting worksheets and supports locking down the structure and window of a workbook, which prevents any structural changes or resizing of the workbook window. -* **[Conversion](conversion)** – Provides support to export the workbook to PDF, HTML, Image and CSV. +* **[Conversion](conversion)** – Provides support to export the workbook to PDF, HTML, Image, and CSV. * **[Zooming](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/worksheet-management#zooming)** – Provides support to zoom in and zoom out of the worksheet view. -* **[Localization](localization)** - Provides support to localize all the static text in a Ribbon and all dialogs to any desired language. +* **[Localization](localization)** – Provides support to localize all static text in the ribbon and all dialogs to any desired language. -* **Supported file types** - Ability to import the different types of excel which are XLS, XLSX, XLSM, XLT, XLTX, CSV(Comma delimited) respectively. +* **Supported file types** – Imports the following Excel formats: XLS, XLSX, XLSM, XLT, XLTX, and CSV (comma-delimited). ## Related Link - [Getting Started](getting-started) - [API Reference](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.html) - [Online Demos](https://github.com/syncfusion/spreadsheet-editor-sdk-wpf-demos) - [GitHub Samples](https://github.com/SyncfusionExamples/create-view-edit-excel-files-using-wpf-spreadsheet) -- [Release Notes](https://help.syncfusion.com/wpf/release-notes/v33.1.46) \ No newline at end of file +- [Release Notes](https://help.syncfusion.com/wpf/release-notes) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Printing.md b/Document-Processing/Excel/Spreadsheet/WPF/Printing.md index f108180651..1f1962d0c5 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Printing.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Printing.md @@ -55,5 +55,7 @@ pdfViewer.Print(true); {% endhighlight %} {% endtabs %} +## See Also -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +- [WPF Spreadsheet feature tour](https://www.syncfusion.com/wpf-controls/spreadsheet) +- [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Ribbon-Customization.md b/Document-Processing/Excel/Spreadsheet/WPF/Ribbon-Customization.md index 0b0e550d26..12f6f0cec2 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Ribbon-Customization.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Ribbon-Customization.md @@ -13,15 +13,15 @@ Ribbon Customization can be done in two ways, ## Using Control Template -User can customize the ribbon items by overriding the template of [SfSpreadsheetRibbon](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheetRibbon.html). +You can customize the ribbon items by overriding the template of [SfSpreadsheetRibbon](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheetRibbon.html). ## Using Event -By invoking SfSpreadsheetRibbon Loaded Event, User can add/delete the ribbon menu items. +You can add or remove ribbon menu items by handling the `SfSpreadsheetRibbon.Loaded` event. ### Adding a RibbonTab -To add a custom ribbon tab with user defined menu options in `SfSpreadsheetRibbon`, +To add a custom ribbon tab with user-defined menu options to `SfSpreadsheetRibbon`, {% tabs %} {% highlight xaml %} @@ -61,9 +61,9 @@ void ribbon_Loaded(object sender, RoutedEventArgs e) {% endhighlight %} {% endtabs %} -### Adding a Ribbon Items in Existing Tab +### Adding a Ribbon Item to an Existing Tab -To add a ribbon items in already existing tab, +To add a ribbon item to an already existing tab, {% tabs %} {% highlight xaml %} @@ -96,7 +96,7 @@ void ribbon_Loaded(object sender, RoutedEventArgs e) ### Removing a RibbonTab -To remove the ribbon tab in the SfSpreadsheetRibbon, +To remove a ribbon tab from `SfSpreadsheetRibbon`, {% tabs %} {% highlight xaml %} @@ -112,7 +112,7 @@ void ribbon_Loaded(object sender, RoutedEventArgs e) { var ribbon1 = GridUtil.GetVisualChild(sender as FrameworkElement); - //To remove the Data tab from the ribbon, + // To remove the Data tab from the ribbon, if (ribbon1 != null) { @@ -124,9 +124,9 @@ void ribbon_Loaded(object sender, RoutedEventArgs e) {% endtabs %} -### Removing a Ribbon Items in a RibbonTab +### Removing a Ribbon Item from a RibbonTab -To remove the ribbon menu items in the ribbon tab of SfSpreadsheetRibbon, +To remove ribbon menu items from a ribbon tab in `SfSpreadsheetRibbon`, {% tabs %} {% highlight xaml %} @@ -142,7 +142,7 @@ void ribbon_Loaded(object sender, RoutedEventArgs e) { var ribbon1 = GridUtil.GetVisualChild(sender as FrameworkElement); - // To remove the Freeze panes menu group in View tab, + // To remove the Freeze Panes menu group in the View tab, if (ribbon1 != null) { @@ -153,12 +153,12 @@ void ribbon_Loaded(object sender, RoutedEventArgs e) {% endhighlight %} {% endtabs %} -### Canceling a Ribbon commands +### Canceling a Ribbon Command -You can cancel particular action of SpreadsheetRibbon commands by handling [CommandExecuting](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.CommandExecutionEventArgs.html) event. +You can cancel particular actions of SpreadsheetRibbon commands by handling the [CommandExecuting](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.CommandExecutionEventArgs.html) event. {% tabs %} -{% highlight xaml%} +{% highlight xaml %} {% endhighlight %} {% endtabs %} @@ -169,12 +169,12 @@ this.ribbon.Commands.CommandExecuting += Commands_CommandExecuting; void Commands_CommandExecuting(object sender, CommandExecutingEventArgs args) { - //stops copy button command execution. - if(args.CommandName == "Copy") + // Stops the copy button's command execution. + if (args.CommandName == "Copy") { - //set the bool value is true. - //the operation is not performed as you mentioned in CommandName - args.cancel = true; + // Set the bool value to true. + // The operation specified in CommandName will not be performed. + args.Cancel = true; } } {% endhighlight %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md b/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md index e8c02fa3c1..0cb8f0fcff 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md @@ -8,11 +8,11 @@ documentation: ug --- # Rows and Columns in WPF Spreadsheet (SfSpreadsheet) -This section explains about the operations related with rows and columns in SfSpreadsheet +This section explains the operations related to rows and columns in SfSpreadsheet. ## Insert Rows and Columns -SfSpreadsheet provides support for dynamically inserting rows and columns into a worksheet. +SfSpreadsheet lets you dynamically insert rows and columns into a worksheet. {% tabs %} {% highlight c# %} @@ -20,15 +20,15 @@ SfSpreadsheet provides support for dynamically inserting rows and columns into a spreadsheet.ActiveSheet.InsertRow(2, 3); spreadsheet.ActiveGrid.Model.InsertRows(2, 3); -//For Inserting Cols +//For Inserting Columns spreadsheet.ActiveSheet.InsertColumn(3, 2); spreadsheet.ActiveGrid.Model.InsertColumns(3, 2); {% endhighlight %} {% endtabs %} -###Events +### Events -Below events of [SpreadsheetGridModel](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html) are triggered while inserting the rows and columns. +Below events of [SpreadsheetGridModel](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html) are triggered while inserting the rows and columns. * [RowsInserted](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGridModel_RowsInserted) * [ColumnsInserted](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGridModel_ColumnsInserted) @@ -53,7 +53,7 @@ void Model_ColumnsInserted(object sender, GridRangeInsertedEventArgs e) ## Delete Rows and Columns -SfSpreadsheet provides support for deleting rows and columns from a worksheet. +SfSpreadsheet lets you delete rows and columns from a worksheet. {% tabs %} {% highlight c# %} @@ -61,15 +61,15 @@ SfSpreadsheet provides support for deleting rows and columns from a worksheet. spreadsheet.ActiveSheet.DeleteRow(5, 2); spreadsheet.ActiveGrid.Model.RemoveRows(5, 2); -//For Deleting Cols +//For Deleting Columns spreadsheet.ActiveSheet.DeleteColumn(3, 2); spreadsheet.ActiveGrid.Model.RemoveColumns(3, 2); {% endhighlight %} {% endtabs %} -###Events +### Events -Below events of [SpreadsheetGridModel](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html) are triggered while deleting the rows and columns. +Below events of [SpreadsheetGridModel](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html) are triggered while deleting the rows and columns. * [RowsRemoved](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGridModel_RowsRemoved) * [ColumnsRemoved](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGridModel.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGridModel_ColumnsRemoved) @@ -94,15 +94,15 @@ void Model_ColumnsInserted(object sender, GridRangeInsertedEventArgs e) ## Hide Rows and Columns -SfSpreadsheet provides support to hide rows/columns and this can be done by [HideRow](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_HideRow_System_Int32_) and [HideColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_HideColumn_System_Int32_) method +SfSpreadsheet lets you hide rows and columns by calling the [HideRow](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_HideRow_System_Int32_) and [HideColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_HideColumn_System_Int32_) methods. {% tabs %} {% highlight c# %} -//For Hiding Rows, +//For Hiding Rows spreadsheet.ActiveSheet.HideRow(5); spreadsheet.ActiveGrid.RowHeights.SetHidden(5, 5, true); -//For Hiding Cols, +//For Hiding Columns spreadsheet.ActiveSheet.HideColumn(4); spreadsheet.ActiveGrid.ColumnWidths.SetHidden(4, 4, true); {% endhighlight %} @@ -110,47 +110,47 @@ spreadsheet.ActiveGrid.ColumnWidths.SetHidden(4, 4, true); ## Unhide Rows and Columns -Unhide the rows/columns in SfSpreadsheet can be done by [ShowRow](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_ShowRow_System_Int32_System_Boolean_) and [ShowColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_ShowColumn_System_Int32_System_Boolean_) methods. +You can unhide rows/columns in SfSpreadsheet by calling the [ShowRow](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_ShowRow_System_Int32_System_Boolean_) and [ShowColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_ShowColumn_System_Int32_System_Boolean_) methods. {% tabs %} {% highlight c# %} -//For Unhiding Rows, +//For Unhiding Rows spreadsheet.ActiveSheet.ShowRow(5, true); spreadsheet.ActiveGrid.RowHeights.SetHidden(5, 5, false); -//For Unhiding Cols, -spreadsheet.ActiveSheet.ShowColumn(4,true); +//For Unhiding Columns +spreadsheet.ActiveSheet.ShowColumn(4, true); spreadsheet.ActiveGrid.ColumnWidths.SetHidden(4, 4, false); {% endhighlight %} {% endtabs %} ## Row Height and Column Width -SfSpreadsheet provides support to adjust the row height and column width. And also can import the adjusted row height and column width from Excel. SfSpreadsheet provides support to fit the row and column based on its contents. +SfSpreadsheet provides support to adjust the row height and column width. The adjusted row height and column width can also be imported from Excel. Use the [AutofitColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitColumn_System_Int32_), [AutofitRow](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitRow_System_Int32_), [AutofitColumns](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitColumns), and [AutofitRows](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitRows) methods of XlsIO to fit rows and columns to their content. {% tabs %} {% highlight c# %} -//For setting RowHeight for 4th Row +//For setting RowHeight for 4th Row (1-based index; value is in pixels) spreadsheet.ActiveGrid.SetRowHeight(4, 4, 30); spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Row(4), true); -//For setting ColumnWidth for 5th Column +//For setting ColumnWidth for 5th Column (1-based index; value is in pixels) spreadsheet.ActiveGrid.SetColumnWidth(5, 5, 22); spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(5), true); {% endhighlight %} {% endtabs %} -N> In case if you insert/delete and hide/unhide the rows/columns inside the Grouping, [RefreshOutlines](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RefreshOutlines_System_Boolean_System_Boolean_) method must be invoked to refresh/update the Outlines of the Group. +N> If you insert/delete or hide/unhide rows/columns inside a Grouping, the [RefreshOutlines](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RefreshOutlines_System_Boolean_System_Boolean_) method must be invoked to refresh the group outlines. ## Freeze Rows and Columns -SfSpreadsheet provides support for Freeze panes to keep an area of a worksheet visible while you scroll to another area of the worksheet. +SfSpreadsheet provides support for freezing panes to keep an area of a worksheet visible while you scroll to another area of the worksheet. {% tabs %} {% highlight c# %} //Freeze panes -//To Freeze 4 rows and 4 columns +//To freeze 4 rows and 4 columns spreadsheet.Workbook.ActiveSheet.Range[4, 4].FreezePanes(); spreadsheet.ActiveGrid.FrozenRows = 5; spreadsheet.ActiveGrid.FrozenColumns = 5; @@ -159,13 +159,13 @@ spreadsheet.ActiveGrid.FrozenColumns = 5; ## Unfreeze Rows and Columns -SfSpreadsheet provides support to unfreeze the freeze panes in the worksheet of SfSpreadsheet. +SfSpreadsheet provides support to unfreeze the previously frozen panes in the worksheet. {% tabs %} {% highlight c# %} //Unfreeze panes -//To Unfreeze 4 rows and 4 columns +//To unfreeze the previously frozen rows and columns spreadsheet.Workbook.ActiveSheet.RemovePanes(); spreadsheet.ActiveGrid.FrozenRows = 1; spreadsheet.ActiveGrid.FrozenColumns = 1; @@ -174,37 +174,40 @@ spreadsheet.ActiveGrid.FrozenColumns = 1; ## Auto Fit Rows and Columns -SfSpreadsheet provides support to fit the rows or columns based on its content at run time. +SfSpreadsheet lets you fit rows and columns to their content at run time. You can fit the rows/columns by calling [AutoFitRows](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitRows) and [AutoFitColumns](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitColumns) methods of XlsIO’s `IRange`. Also set the adjusted row height and column width into the grid by using [SetRowHeight](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetRowHeight_System_Int32_System_Int32_System_Double_) and [SetColumnWidth](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetColumnWidth_System_Int32_System_Int32_System_Double_) methods of `SpreadsheetGrid`. {% tabs %} {% highlight c# %} -//To AutoFit a single column, +//To AutoFit a single column spreadsheet.ActiveSheet.AutofitColumn(2); -spreadsheet.ActiveGrid.SetColumnWidth(2,2,spreadsheet.ActiveSheet.GetColumnWidthInPixels(2)); +spreadsheet.ActiveGrid.SetColumnWidth(2, 2, spreadsheet.ActiveSheet.GetColumnWidthInPixels(2)); -//To AutoFit multiple columns, +//To AutoFit multiple columns spreadsheet.ActiveSheet["A1:D100"].AutofitColumns(); -for(int i = 1; i <= 4 ; i++) +for (int i = 1; i <= 4; i++) { - spreadsheet.ActiveGrid.SetColumnWidth(i,i,spreadsheet.ActiveSheet.GetColumnWidthInPixels(i)); + spreadsheet.ActiveGrid.SetColumnWidth(i, i, spreadsheet.ActiveSheet.GetColumnWidthInPixels(i)); } -//To AutoFit a single row, +//To AutoFit a single row spreadsheet.ActiveSheet.AutofitRow(3); -spreadsheet.ActiveGrid.SetRowHeight(3,3,spreadsheet.ActiveSheet.GetRowHeightInPixels(3)); +spreadsheet.ActiveGrid.SetRowHeight(3, 3, spreadsheet.ActiveSheet.GetRowHeightInPixels(3)); -//To AutoFit multiple rows, +//To AutoFit multiple rows spreadsheet.ActiveSheet["B1:B5"].AutofitRows(); -for(int i = 1; i <= 5 ; i++) +for (int i = 1; i <= 5; i++) { - spreadsheet.ActiveGrid.SetRowHeight(i,i,spreadsheet.ActiveSheet.GetRowHeightInPixels(i)); + spreadsheet.ActiveGrid.SetRowHeight(i, i, spreadsheet.ActiveSheet.GetRowHeightInPixels(i)); } {% endhighlight %} {% endtabs %} -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +## See Also + +* [WPF Spreadsheet Editor feature tour](https://www.syncfusion.com/wpf-controls/spreadsheet) +* [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Selection.md b/Document-Processing/Excel/Spreadsheet/WPF/Selection.md index 0322d32eb5..9165da078e 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Selection.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Selection.md @@ -9,11 +9,11 @@ documentation: ug # Selection in WPF Spreadsheet (SfSpreadsheet) -This section explains about the Selection behavior in [WPF Spreadsheet Editor](https://www.syncfusion.com/spreadsheet-editor-sdk/wpf-spreadsheet-editor). +This section explains the Selection behavior in the [WPF Spreadsheet Editor](https://www.syncfusion.com/spreadsheet-editor-sdk/wpf-spreadsheet-editor). -The SfSpreadsheet control provides support for selection in grid by using mouse, keyboard and touch interactions. +The SfSpreadsheet control provides selection support in the grid by using mouse, keyboard, and touch interactions. -By default, Selection behavior will be enabled in `SfSpreadsheet`,but if you want to disable the selection in SfSpreadsheet, then set the [AllowSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_AllowSelection) Property to be false. +By default, selection is enabled in `SfSpreadsheet`. To disable selection, set the [AllowSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_AllowSelection) property to `false`. {% tabs %} {% highlight c# %} @@ -24,19 +24,19 @@ void spreadsheet_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) {% endhighlight %} {% endtabs %} -## Accessing the Current cell +## Accessing the Current Cell -SfSpreadsheet allows the user to access the active cell by using the `CurrentCell` property of [SelectionController](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html) Class. +The current cell is exposed through the `CurrentCell` property of the [SelectionController](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html) class. {% tabs %} {% highlight c# %} -var cell= spreadsheet.ActiveGrid.SelectionController.CurrentCell; +var cell = spreadsheet.ActiveGrid.SelectionController.CurrentCell; {% endhighlight %} {% endtabs %} -## Accessing the Selected ranges +## Accessing the Selected Ranges -SfSpreadsheet allows the user to access the selected ranges of the `SpreadsheetGrid` using [SelectedRanges](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectedRanges) property of `SpreadsheetGrid`. +The selected ranges of the `SpreadsheetGrid` are exposed through the [SelectedRanges](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectedRanges) property. The returned object is a `GridRangeInfoList` instance. {% tabs %} {% highlight c# %} @@ -44,45 +44,45 @@ var rangeList = spreadsheet.ActiveGrid.SelectedRanges; {% endhighlight %} {% endtabs %} -N> To get the active range in the selected ranges list, use [ActiveRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridRangeInfoList.html#Syncfusion_UI_Xaml_CellGrid_GridRangeInfoList_ActiveRange) property of [GridRangeInfoList](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridRangeInfoList.html) class. +N> To get the currently focused range within the selected ranges list, use the [ActiveRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridRangeInfoList.html#Syncfusion_UI_Xaml_CellGrid_GridRangeInfoList_ActiveRange) property of the [GridRangeInfoList](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridRangeInfoList.html) class. ## Adding or Clearing the Selection -SfSpreadsheet allows the user to add and clear the selection in the Active `SpreadsheetGrid` for the given range. +The active `SpreadsheetGrid` allows you to add new selection ranges and clear the existing selection programmatically. {% tabs %} {% highlight c# %} -//To Add the Selection for range, -spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Cells(4,6,5,8)); +// Add a selection for the cell range. +spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Cells(4, 6, 5, 8)); -//To Add the Selection for particular row, +// Add a selection for a single row. spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Row(4)); -//To Add the Selection for multiple rows, -spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Rows(4,9)); +// Add a selection for multiple rows. +spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Rows(4, 9)); -//To Add the Selection for particular column, +// Add a selection for a single column. spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Col(5)); -//To Add the Selection for multiple columns, -spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Cols(5,10)); +// Add a selection for multiple columns. +spreadsheet.ActiveGrid.SelectionController.AddSelection(GridRangeInfo.Cols(5, 10)); -//To Clear the Selection, +// Clear the current selection. spreadsheet.ActiveGrid.SelectionController.ClearSelection(); {% endhighlight %} {% endtabs %} ## Move Current Cell -SfSpreadsheet allows the user to move the current cell to the mentioned cell in `SpreadsheetGrid`. +Move the current cell to a specified cell in the `SpreadsheetGrid` using the `MoveCurrentCell` method. {% tabs %} {% highlight c# %} -//Moves current cell to the mentioned row and column index of cell, +// Moves current cell to the mentioned row and column index of the cell. spreadsheet.ActiveGrid.CurrentCell.MoveCurrentCell(5, 5); -//For moving the current cell to a different sheet, +// Move the current cell to a different sheet. spreadsheet.SetActiveSheet("Sheet2"); spreadsheet.ActiveGrid.CurrentCell.MoveCurrentCell(6, 5); @@ -91,7 +91,7 @@ spreadsheet.ActiveGrid.CurrentCell.MoveCurrentCell(6, 5); ## Converting GridRangeInfo into IRange -SfSpreadsheet allows the user to convert the `GridRangeInfo` into the equivalent `IRange` by using [ConvertGridRangeToExcelRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html#Syncfusion_UI_Xaml_Spreadsheet_Helpers_GridExcelHelper_ConvertGridRangeToExcelRange_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_) method of [GridExcelHelper](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html) class. +Convert a `GridRangeInfo` value to its equivalent XlsIO `IRange`using the [ConvertGridRangeToExcelRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html#Syncfusion_UI_Xaml_Spreadsheet_Helpers_GridExcelHelper_ConvertGridRangeToExcelRange_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_) method of the [GridExcelHelper](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html) class. {% tabs %} {% highlight c# %} @@ -99,11 +99,13 @@ var excelRange = GridExcelHelper.ConvertGridRangeToExcelRange(GridRangeInfo.Cell {% endhighlight %} {% endtabs %} -T> Users can also convert the `IRange` into equivalent `GridRangeInfo` by using [ConvertExcelRangeToGridRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html#Syncfusion_UI_Xaml_Spreadsheet_Helpers_GridExcelHelper_ConvertExcelRangeToGridRange_Syncfusion_XlsIO_IRange_) method of [GridExcelHelper](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html) class. +T> You can also convert an `IRange` into its equivalent `GridRangeInfo` by using the [ConvertExcelRangeToGridRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html#Syncfusion_UI_Xaml_Spreadsheet_Helpers_GridExcelHelper_ConvertExcelRangeToGridRange_Syncfusion_XlsIO_IRange_) method of [GridExcelHelper](http://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.Helpers.GridExcelHelper.html). -## Properties, Methods and Events +## Properties, Methods, and Events -Below table lists the events associated with selection behavior, +The tables below list the events, properties, and methods associated with selection behavior. + +### Events @@ -113,11 +115,11 @@ Description + Occurs when you click a cell. +Occurs when the current cell is about to be activated. This event allows you to cancel the current cell activation. +Occurs when the selection is about to change. This event allows you to cancel the selection change. +Occurs after the selection changes.
{{ '[CellClick](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} - Occurs when you click on the cell.
{{ '[CurrentCellActivating](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html)' | markdownify }} -Occurs when the current cell is going to be activated. This event allow to cancel the current cell activation.
{{ '[CurrentCellActivated](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html)' | markdownify }} @@ -125,14 +127,14 @@ Occurs after the current cell is activated.
{{ '[SelectionChanging](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html)' | markdownify }} -Occurs when the selection is going to be changed. This event allows to cancel the selection change.
{{ '[SelectionChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html)' | markdownify }} -Occurs after the selection is changed.
-Below table lists the properties associated with selection, +### Selection properties @@ -142,11 +144,11 @@ Description +Gets or sets the collection of selected ranges from the grid. +Gets or sets the brush used to fill the selected area. +Gets or sets the thickness of the selection border. +Gets the selection controller, which provides the selection of content when the user drags the pressed mouse to an edge of the control. +Gets or sets a value indicating whether selection is allowed in the active grid. +Gets or sets a value indicating whether the touch indicator is shown. +Gets or sets the distance, in device-independent pixels, of the touch precision point from the touch indicator. Default is 30.
{{ '[SelectedRanges](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectedRanges)' | markdownify }} -Gets or sets the collection of selected ranges from grid.
{{ '[SelectionBrush](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectionBrush)' | markdownify }} -Gets or sets the selected area brush.
{{ '[SelectionBorderBrush](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectionBorderBrush)' | markdownify }} @@ -154,26 +156,26 @@ Gets or sets the selection border brush.
{{ '[SelectionBorderThickness](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectionBorderThickness)' | markdownify }} -Gets or sets the thickness of selection border.
{{ '[SelectionController](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectionController) ' | markdownify }} -Gets the Selection Controller which provides the selection of content when the user drags the pressed mouse to an edge of the control.
{{ '[AllowSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_AllowSelection) ' | markdownify }} -Gets or Sets the value whether to allow the selection in the ActiveGrid or not.
{{ '[ShowTouchIndicator](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html#Syncfusion_UI_Xaml_CellGrid_SelectionController_ShowTouchIndicator) ' | markdownify }} -Determines whether the touch indicator will be shown or not.
{{ '[TouchHitTestPrecision](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html#Syncfusion_UI_Xaml_CellGrid_SelectionController_TouchHitTestPrecision) ' | markdownify }} -Gets or sets the distance of touch precision point from touch indicator.
- -Below table lists the properties associated with [CurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_CurrentCell) of SpreadsheetGrid, + +### [CurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_CurrentCell) properties @@ -183,30 +185,30 @@ Description +Gets the row and column index of the current cell. +Gets the row index of the current cell. +Gets the column index of the current cell. +Gets the range of the current cell. + Gets a value indicating whether the grid has a current cell. +Gets the row and column index of the previous current cell.
{{ '[CellRowColumnIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_CellRowColumnIndex) ' | markdownify }} -Gets the row and column index of the CurrentCell.
{{ '[RowIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_RowIndex) ' | markdownify }} -Gets the row index of the CurrentCell.
{{ '[ColumnIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_ColumnIndex) ' | markdownify }} -Gets the column index of the CurrentCell.
{{ '[Range](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_Range) ' | markdownify }} -Gets the range of the CurrentCell.
{{ '[HasCurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_HasCurrentCell) ' | markdownify }} - Gets the value indicating whether the Grid has CurrentCell or not.
{{ '[PreviousRowColumnIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_PreviousRowColumnIndex) ' | markdownify }} -Gets or sets the row and column index of old CurrentCell.
-Below table lists the methods associated with selection, +### Methods @@ -216,20 +218,20 @@ Description +Adds or extends the selection to the specified range. +Clears the selection and resets the current cell to A1. +Moves the current cell to the specified row and column index. The optional needToClearSelection parameter (default true) controls whether the existing selection is cleared.
{{ '[AddSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html#Syncfusion_UI_Xaml_CellGrid_SelectionController_AddSelection_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_)' | markdownify }} -Adds/Extends the Selection to the mentioned range .
{{ '[ClearSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html#Syncfusion_UI_Xaml_CellGrid_SelectionController_ClearSelection)' | markdownify }} -Clears the Selection.
{{ '[MoveCurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_MoveCurrentCell_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_System_Boolean_)' | markdownify }} -Move the Current cell to mentioned row and column index.
## Key Navigation -Below table lists the key combinations associated with selection, +The following table lists the key combinations associated with selection. @@ -238,108 +240,104 @@ Key Combination +Home +End +Up Arrow +Down Arrow +Left Arrow +Right Arrow +Ctrl+Home +Ctrl+End +Alt+Page Up +Alt+Page Down +Ctrl+Arrow Keys +Enter +Shift+Enter +Tab +Shift+Tab +Backspace +Shift+Arrow Keys +Ctrl+Shift+Arrow Keys +Ctrl+Shift+Home +Shift+Page Down +Shift+Page Up
Description
-HOME -Moves to the first cell of the current row .
+Moves to the first cell of the current row.
-END -Moves to the last cell of the current row .
+Moves to the last cell of the current row.
-UPARROW - -Moves to one cell up of the current cell in the worksheet.
+Moves one cell up from the current cell.
-DOWNARROW - -Moves to one cell down of the current cell in the worksheet.
+Moves one cell down from the current cell.
-LEFTARROW - -Moves to one cell left of the current cell in the worksheet.
+Moves one cell left from the current cell.
-RIGHTARROW - -Moves to one cell right of the current cell in the worksheet.
+Moves one cell right from the current cell.
-PAGEUP +Page Up Moves to the first visible cell of the current column.
-PAGEDOWN +Page Down Moves to the last visible cell of the current column.
-CTRL+HOME -Moves to the beginning cell of a worksheet.
+Moves to the first cell of the worksheet (A1).
-CTRL+END -Moves to the last cell of a worksheet.
+Moves to the last used cell of the worksheet.
-ALT+PAGE UP -Moves one screen to the left in a worksheet.
+Moves one screen to the left in the worksheet.
-ALT+PAGE DOWN -Moves one screen to the right in a worksheet.
+Moves one screen to the right in the worksheet.
-CTRL + ARROW KEYS -Moves to the first/last cell of the current cell based on Arrow directions .
+Moves to the first or last contiguous data cell in the arrow direction.
-ENTER -Moves the active current cell to one cell down in the selection.
+Moves the active current cell one cell down within the selection.
-SHIFT+ENTER -Moves the active current cell to one cell up in the selection.
+Moves the active current cell one cell up within the selection.
-TAB -Moves the active current cell in one cell to the right of the selection.
+Moves the active current cell one cell to the right within the selection.
-SHIFT+TAB -Moves the active current cell in one cell to the left of the selection.
+Moves the active current cell one cell to the left within the selection.
-BACKSPACE -Begins the edit operation for the active cell in the selection.
+Begins the edit operation for the active cell.
-CTRL+A +Ctrl+A Selects the entire worksheet.
-SHIFT+ARROW KEYS -Extends the selection by one cell based on the arrow direction.
+Extends the selection by one cell in the arrow direction.
-CTRL+SHIFT+ARROW KEYS -Extend the selection to the last cell in a row or column.
+Extends the selection to the last contiguous data cell in a row or column.
-SHIFT+HOME +Shift+Home Extends the selection to the first column from the active cell.
-CTRL+SHIFT+HOME -Extends the selection from the active cell to the first cell.
+Extends the selection from the active cell to the first cell of the worksheet (A1).
-SHIFT+PAGE DOWN -Extends the selection down in a worksheet.
+Extends the selection down one screen in the worksheet.
-SHIFT+PAGE UP -Extends the selection up in a worksheet.
+Extends the selection up one screen in the worksheet.
diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md b/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md index b2b389646b..6838b31256 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md @@ -8,51 +8,60 @@ documentation: ug --- # Shapes in WPF Spreadsheet (SfSpreadsheet) - This section explains how to import charts, sparklines, pictures and textboxes in SfSpreadsheet. + +This section explains how to import charts, sparklines, pictures, and text boxes in SfSpreadsheet. ## Charts -SfSpreadsheet provides support to import charts from excel which are used to represent numeric data in graphical format to make it easier to understand large quantities of data. +SfSpreadsheet provides support to import charts from Excel, which represent numeric data graphically to make it easier to understand large quantities of data. -For importing charts in SfSpreadsheet, add the following assembly as reference into the application. +For importing charts in SfSpreadsheet, add the following assembly as a reference in the application. Assembly: **Syncfusion.SfSpreadsheetHelper.WPF.dll** -Create an instance of Syncfusion.UI.Xaml.SpreadsheetHelper.[GraphicChartCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SpreadsheetHelper.GraphicChartCellRenderer.html) and add that renderer into [GraphicCellRenderers](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicModel.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicModel_GraphicCellRenderers) collection by using the helper method [AddGraphicChartCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddGraphicChartCellRenderer_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_IGraphicCellRenderer_) which is available under the namespace `Syncfusion.UI.Xaml.Spreadsheet.GraphicCells`. +Create an instance of Syncfusion.UI.Xaml.SpreadsheetHelper.[GraphicChartCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SpreadsheetHelper.GraphicChartCellRenderer.html) and add that renderer to the [GraphicCellRenderers](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicModel.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicModel_GraphicCellRenderers) collection by using the helper method [AddGraphicChartCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddGraphicChartCellRenderer_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_IGraphicCellRenderer_), which is available under the namespace `Syncfusion.UI.Xaml.Spreadsheet.GraphicCells`. {% tabs %} {% highlight c# %} +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; +using Syncfusion.UI.Xaml.SpreadsheetHelper; + public MainWindow() { - InitializeComponent(); - - //For importing charts, - this.spreadsheet.AddGraphicChartCellRenderer(new GraphicChartCellRenderer()); + InitializeComponent(); + + // For importing charts + this.spreadsheet.AddGraphicChartCellRenderer(new GraphicChartCellRenderer()); } {% endhighlight %} {% endtabs %} ### Adding the Charts at Runtime -For adding the Charts in SfSpreadsheet at runtime, use [AddChart](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddChart_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_XlsIO_IWorksheet_) method, also you can resize and reposition the chart. +For adding charts in SfSpreadsheet at runtime, use the [AddChart](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddChart_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_XlsIO_IWorksheet_) method. You can also resize and reposition the chart. {% tabs %} {% highlight c# %} +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; +using Syncfusion.XlsIO; + var chart = spreadsheet.AddChart(spreadsheet.ActiveSheet); object[] Y_values = new object[] { 200, 100, 100 }; object[] X_values = new object[] { "Total Income", "Expenses", "Profit" }; IChartSerie series = chart.Series.Add(ExcelChartType.Pie); -// Enters the X and Y values directly +// Enter the X and Y values directly series.EnteredDirectlyValues = Y_values; series.EnteredDirectlyCategoryLabels = X_values; var shape = chart as ShapeImpl; -// Re-Positioning Chart +// Reposition the chart shape.Top = 200; shape.Left = 200; -//Re-sizing a Chart +// Resize the chart shape.Height = 300; shape.Width = 300; {% endhighlight %} @@ -64,35 +73,43 @@ For importing sparklines in SfSpreadsheet, add the following assembly as referen Assembly: **Syncfusion.SfSpreadsheetHelper.WPF.dll** -Create an instance of Syncfusion.UI.Xaml.SpreadsheetHelper.[SparklineCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SpreadsheetHelper.SparklineCellRenderer.html) and add that renderer into the Spreadsheet by using the helper method [AddSparklineCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddSparklineCellRenderer_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_UI_Xaml_Spreadsheet_CellRenderer_ISpreadsheetCellRenderer_) which is available under the namespace `Syncfusion.UI.Xaml.Spreadsheet.GraphicCells`. +Create an instance of Syncfusion.UI.Xaml.SpreadsheetHelper.[SparklineCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.SpreadsheetHelper.SparklineCellRenderer.html) and add that renderer to the spreadsheet by using the helper method [AddSparklineCellRenderer](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddSparklineCellRenderer_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_UI_Xaml_Spreadsheet_CellRenderer_ISpreadsheetCellRenderer_), which is available under the namespace `Syncfusion.UI.Xaml.Spreadsheet.GraphicCells`. {% tabs %} {% highlight c# %} +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; +using Syncfusion.UI.Xaml.SpreadsheetHelper; + public MainWindow() { - InitializeComponent(); - - //For importing sparklines, - this.spreadsheet.AddSparklineCellRenderer(new SparklineCellRenderer()); + InitializeComponent(); + + // For importing sparklines + this.spreadsheet.AddSparklineCellRenderer(new SparklineCellRenderer()); } {% endhighlight %} {% endtabs %} ## Pictures -SfSpreadsheet provides support to import images in SpreadsheetGrid and to add an image at run time, use [AddImage](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddImage_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_System_IO_Stream_) method and also you can resize and reposition the image. +SfSpreadsheet provides support to import images in `SpreadsheetGrid`. To add an image at runtime, use the [AddImage](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddImage_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_System_IO_Stream_) method. You can also resize and reposition the image. {% tabs %} {% highlight c# %} +using Syncfusion.UI.Xaml.Grid.ScrollAxis; +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; + var worksheet = spreadsheet.ActiveSheet; var stream = typeof(MainWindow).Assembly.GetManifestResourceStream("GraphicCellDemo.Data.Sample.jpg"); var shape = spreadsheet.AddImage(worksheet, new RowColumnIndex(5, 5), stream); -// Re-Positioning Picture +// Reposition the picture shape.Top = 200; shape.Left = 200; - //Re-sizing a Picture + // Resize the picture shape.Height = 200; shape.Width = 200; {% endhighlight %} @@ -100,14 +117,19 @@ shape.Width = 200; ## TextBoxes -SfSpreadsheet provides support to import RichText Box in `SpreadsheetGrid` and to add the rich text box at run time, use [AddTextBox](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddTextBox_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_System_Windows_Size_System_String_) method +SfSpreadsheet provides support to import RichTextBox content in `SpreadsheetGrid`. To add a rich text box at runtime, use the [AddTextBox](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicCellHelper.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicCellHelper_AddTextBox_Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_System_Windows_Size_System_String_) method. You can also resize and reposition the text box. {% tabs %} {% highlight c# %} +using System.Windows; +using Syncfusion.UI.Xaml.Grid.ScrollAxis; +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; + var rtfText = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset1 Calibri;}{\\f1\\fnil\\fcharset1 Calibri;}}{\\colortbl;\\red0\\green0\\blue0;\\red255\\green0\\blue0;}{\\f0\\fs22\\b\\cf1\\u83*\\u121*\\u110*\\u99*\\u102*\\u117*\\u115*\\u105*\\u111*\\u110*\\u32*\\b0} {\\f1\\fs22\\cf2\\u83*\\u111*\\u102*\\u116*\\u119*\\u97*\\u114*\\u101*\\u32*}{\\f1\\fs22\\cf1\\u80*\\u118*\\u116*\\u46*\\u32*\\u76*\\u116*\\u100*}}"; var textBox = spreadsheet.AddTextBox(spreadsheet.ActiveSheet, new RowColumnIndex(5, 5), new Size(200, 200), rtfText) as TextBoxShapeImpl; -// Re-positioning RichTextBox +// Reposition the RichTextBox textBox.Left = 200; textBox.Top = 200; {% endhighlight %} @@ -115,10 +137,15 @@ textBox.Top = 200; ## Accessing the selected Shapes -SfSpreadsheet allows the user to access the selected shapes and modify the properties associated with it in `SpreadsheetGrid`. +SfSpreadsheet allows the user to access the selected shapes and modify their properties within `SpreadsheetGrid`. {% tabs %} {% highlight c# %} +using System.Drawing; +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; +using Syncfusion.XlsIO; + var selectedShape = spreadsheet.ActiveGrid.GraphicModel.SelectedShapes; for(int i = 0; i < selectedShape.Count ; i++) @@ -145,11 +172,15 @@ spreadsheet.ActiveGrid.GraphicModel.InvalidateGraphicVisual(); ## Select a Shape Programmatically -Users can select a shape programmatically by using [AddSelectedShapes](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicModel.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicModel_AddSelectedShapes_Syncfusion_XlsIO_Implementation_Shapes_ShapeImpl_) method of [GraphicModel](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicModel.html) class. +Users can select a shape programmatically by using the [AddSelectedShapes](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicModel.html#Syncfusion_UI_Xaml_Spreadsheet_GraphicCells_GraphicModel_AddSelectedShapes_Syncfusion_XlsIO_Implementation_Shapes_ShapeImpl_) method of the [GraphicModel](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.GraphicCells.GraphicModel.html) class. {% tabs %} {% highlight c# %} -var shape = spreadsheet.ActiveSheet.Shapes[2] as ShapeImpl; +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; +using Syncfusion.XlsIO.Implementation.Shapes; + +var shape = spreadsheet.ActiveSheet.Shapes[2] as ShapeImpl; spreadsheet.ActiveGrid.GraphicModel.AddSelectedShapes(shape); {% endhighlight %} {% endtabs %} @@ -160,9 +191,15 @@ Users can clear the selection from the shapes and move the selection to the grid {% tabs %} {% highlight c# %} +using Syncfusion.UI.Xaml.Spreadsheet; +using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; + spreadsheet.ActiveGrid.GraphicModel.ClearSelection(); {% endhighlight %} {% endtabs %} -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +## See Also + +- [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) — feature tour +- [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos) — render and configure the spreadsheet diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Sorting-and-Filtering.md b/Document-Processing/Excel/Spreadsheet/WPF/Sorting-and-Filtering.md index 62dfb483c9..4e463e70b6 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Sorting-and-Filtering.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Sorting-and-Filtering.md @@ -9,11 +9,11 @@ documentation: ug # Sorting and Filtering in WPF Spreadsheet (SfSpreadsheet) -This section explains about sorting and filtering functionalities in the SfSpreadsheet. +This section explains the sorting and filtering functionalities available in the SfSpreadsheet. ## Filtering -By default, Filtering support will be enabled in the SfSpreadsheet, but if you want to disable the Filtering in SfSpreadsheet, set the `AllowFiltering` property of the `SfSpreadsheet` to be false. +Filtering is enabled by default in the SfSpreadsheet. When enabled, filter drop-down buttons appear in the header row of each column. To disable filtering, set the `AllowFiltering` property of the SfSpreadsheet to `false`. {% tabs %} {% highlight xaml %} @@ -46,7 +46,7 @@ void spreadsheet_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) ## Unsupported Features -Currently SfSpreadsheet does not have support for following features. +SfSpreadsheet currently does not support the following features: * Table filtering * Multi-column sorting @@ -55,13 +55,13 @@ Currently SfSpreadsheet does not have support for following features. ### Sorting -* In Microsoft Excel, sorting label should be varied in filter popup based on the type of values in a column (For e.g, "Sort Smallest to Largest" for numeric values, "Sort A to Z" for string values, etc.). But in Spreadsheet, sort label should not be varied based on values due to improve the loading performance of filter popup. -* Sort Ascending or Sort Descending label is not checked in the filter popup, if the column is sorted in Microsoft Excel. Because currently XlsIO do not have support to fetch the sorted order while importing the workbook. +* In Microsoft Excel, the sorting label in the filter pop-up varies based on the type of values in a column (for example, "Sort Smallest to Largest" for numeric values, "Sort A to Z" for string values, and so on). In SfSpreadsheet, the sorting label does not vary based on value type, in order to improve the loading performance of the filter pop-up. +* The "Sort Ascending" or "Sort Descending" label is not checked in the filter pop-up if the column was previously sorted in Microsoft Excel, because XlsIO does not support fetching the sort order while importing the workbook. ### Filtering -* If the filter applied in Microsoft Excel, then the filter will be cleared from all columns while clearing the filter from any one column Because unable to fetch the filtering order. -* While importing the workbook, checked and unchecked items are only displayed in the right most filtered column. Because unable to fetch the filtering order. +* If a filter is applied in Microsoft Excel, clearing the filter from any one column clears the filter from all columns, because the filtering order cannot be fetched. +* While importing the workbook, only the rightmost filtered column displays the checked and unchecked items, because the filtering order cannot be fetched. N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Themes.md b/Document-Processing/Excel/Spreadsheet/WPF/Themes.md index 322fb52afa..934c7c4f14 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Themes.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Themes.md @@ -9,16 +9,26 @@ documentation: ug # Themes in WPF Spreadsheet (SfSpreadsheet) -SfSpreadsheet supports the following built-in themes. -* MaterialLight -* MaterialDark -* Office2019Colorful -* Office2019Black -* Office2019White -* Office2019DarkGray -* FluentLight -* FluentDark -* SystemTheme +SfSpreadsheet supports built-in themes for customizing its appearance. + +## Available Themes + +### Material +* MaterialLight +* MaterialDark + +### Office2019 +* Office2019Colorful +* Office2019Black +* Office2019White +* Office2019DarkGray + +### Fluent +* FluentLight +* FluentDark + +### System +* SystemTheme Refer to the below links to apply themes for the SfSpreadsheet, @@ -29,4 +39,7 @@ Refer to the below links to apply themes for the SfSpreadsheet, ![WPF Spreadsheet with Office2019Black Theme](Themes_images/wpf-spreadsheet-office2019black-theme.png) -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +## See Also + +* [WPF Spreadsheet feature tour](https://www.syncfusion.com/wpf-controls/spreadsheet) +* [WPF Spreadsheet examples on GitHub](https://github.com/Syncfusion-Samples/Syncfusion-WPF-SpreadsheetExamples) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md b/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md index ed8f73947f..ece3f3b901 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md @@ -12,7 +12,15 @@ This section explains how to manage Excel workbooks in SfSpreadsheet, including ## Creating a new Excel Workbook -A new workbook can be created by using a [Create](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Create_System_Int32_) method with specified number of worksheets. By default, a workbook will be created with single worksheet. +A new workbook can be created by using the [Create](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Create_System_Int32_) method with a specified number of worksheets. By default, a workbook will be created with a single worksheet. + +**Parameters** + +| Parameter | Type | Description | +|-----------|------|-------------| +| `sheetCount` | `int` | The number of worksheets to add to the new workbook. If omitted, a single worksheet is created. | + +**Return value:** `void` {% tabs %} {% highlight c# tabtitle="MainWindow.xaml.cs" %} @@ -22,7 +30,7 @@ spreadsheet.Create(2); ## Opening an existing Excel Workbook -The Excel Workbook can be opened in SfSpreadsheet using the [Open](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Open_Syncfusion_XlsIO_IWorkbook_) method in various ways, +The Excel workbook can be opened in SfSpreadsheet using the [Open](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Open_Syncfusion_XlsIO_IWorkbook_) method in various ways. {% tabs %} {% highlight c# tabtitle="MainWindow.xaml.cs" %} @@ -49,7 +57,7 @@ Opening Excel File in SfSpreadsheet ## Saving the Excel Workbook -The Excel workbook can be saved in SfSpreadsheet using [Save](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Save) method. If the workbook already exists in the system drive, it will be saved in the same location, otherwise Save Dialog box opens to save the workbook in user specified location. +The Excel workbook can be saved in SfSpreadsheet using the [Save](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Save) method. If the workbook was originally opened from a file path on the system drive, it will be saved to the same location; otherwise, a Save dialog box opens so the user can specify a location. {% tabs %} {% highlight c# tabtitle="MainWindow.xaml.cs" %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md b/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md index 130f2edc34..4ed8897bdc 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md @@ -8,41 +8,42 @@ control: SfSpreadsheet documentation: ug --- -# Working With Spreadsheet in WPF Spreadsheet (SfSpreadsheet) - This section explains about accessing the Worksheet, Grid and the events associated with it. +# Working with SfSpreadsheet in WPF Spreadsheet (SfSpreadsheet) -## Accessing the Worksheet +This section explains how to access the worksheet, grid, and the events associated with SfSpreadsheet. -A __workbook__ is an excel document in the SfSpreadsheet. It is an object that exposes the [IWorkbook](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorkbook.html) interface. Currently loaded workbook in the Spreadsheet can be accessed by using the [Workbook](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Workbook) property of SfSpreadsheet. +## Accessing the worksheet -A workbook consists of one or more worksheets stored within the worksheet collection. Accessing the worksheets in the collection, can be done by the following ways, +A __workbook__ is an Excel document in SfSpreadsheet. It is an object that exposes the [IWorkbook](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorkbook.html) interface. The currently loaded workbook in SfSpreadsheet can be accessed by using the [Workbook](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Workbook) property of SfSpreadsheet. The Workbook property returns an IWorkbook instance and is non-null only after a workbook has been loaded. + +A workbook consists of one or more worksheets stored within the worksheet collection. The worksheets in the collection can be accessed in the following ways: {% tabs %} {% highlight c# %} -//By Specifying the index as, +//By specifying the index, spreadsheet.Workbook.Worksheets[0] -//By Specifying the sheet name as, -spreadsheet.Workbook.Worksheets["sheet1"] +//By specifying the sheet name, +spreadsheet.Workbook.Worksheets["Sheet1"] -//Access the Active worksheet as, +//Access the Active worksheet, spreadsheet.ActiveSheet {% endhighlight %} {% endtabs %} -For more information regarding working with worksheets, you can refer the [XlsIO UG](https://help.syncfusion.com/file-formats/xlsio/overview) link +For more information regarding working with worksheets, refer to the [XlsIO UG](https://help.syncfusion.com/file-formats/xlsio/overview) link. -N> `ActiveGrid` and `ActiveSheet` property can be accessed only after the `WorkbookLoaded` Event of `SfSpreadsheet` is triggered +N> The `ActiveGrid` and `ActiveSheet` properties can be accessed only after the `WorkbookLoaded` event of `SfSpreadsheet` is triggered. -## Accessing the Grid +## Accessing the grid -Each worksheet in the workbook is loaded into the view as [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) in `SfSpreadsheet`. +Each worksheet in the workbook is loaded into the view as [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) in `SfSpreadsheet`. -When the workbook is loaded in the SfSpreadsheet, the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) Event is invoked and when the workbook is removed from SfSpreadsheet, the [WorkbookUnloaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) Event is invoked. +When the workbook is loaded in SfSpreadsheet, the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) event is invoked, and when the workbook is removed from SfSpreadsheet, the [WorkbookUnloaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) event is invoked. -When the worksheet is added into the SfSpreadsheet, the [WorksheetAdded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) Event is invoked and when the worksheet is removed in the SfSpreadsheet, [WorksheetRemoved](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) Event is invoked. +When the worksheet is added into SfSpreadsheet, the [WorksheetAdded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) event is invoked, and when the worksheet is removed from SfSpreadsheet, the [WorksheetRemoved](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) event is invoked. -Hence you can access the `ActiveGrid` either in the `WorkbookLoaded` or `WorksheetAdded` Event. +You can access the `ActiveGrid` either in the `WorkbookLoaded` or `WorksheetAdded` event. {% tabs %} {% highlight c# %} @@ -60,18 +61,18 @@ void spreadsheet_WorksheetAdded(object sender, WorksheetAddedEventArgs args) void spreadsheet_WorksheetRemoved(object sender, WorksheetRemovedEventArgs args) { - //Access the Active SpreadsheetGrid and unhook the events associated with it + //Access the Active SpreadsheetGrid and unhook the events associated with it. var grid = spreadsheet.ActiveGrid; grid.CurrentCellActivated -= grid_CurrentCellActivated; } {% endhighlight %} {% endtabs %} -You can also access the each `SpreadsheetGrid` in the SfSpreadsheet either by passing the particular sheet name in the [GridCollection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_GridCollection) or by invoking `WorkbookLoaded` Event of SfSpreadsheet. +You can also access each `SpreadsheetGrid` in SfSpreadsheet in two ways: by passing the particular sheet name in the [GridCollection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_GridCollection) or by iterating the `GridCollection` exposed on the `WorkbookLoadedEventArgs` of the `WorkbookLoaded` event. `GridCollection` is a `Dictionary` keyed by sheet name. -### By using Sheet Name +### By using sheet name -For your reference, setting the row and column count dynamically for the second sheet in the Workbook +For reference, this example sets the row and column count dynamically for the second sheet in the workbook. A new workbook contains a single default sheet, so you must add a second sheet (for example, via `spreadsheet.Workbook.Worksheets.Add("Sheet2")`) before accessing `Worksheets[1]`. {% tabs %} {% highlight c# %} @@ -81,7 +82,7 @@ spreadsheet.GridCollection[sheet.Name].ColumnCount = 12; {% endhighlight %} {% endtabs %} -### By using Event +### By using event {% tabs %} {% highlight c# %} @@ -91,28 +92,28 @@ spreadsheet.WorkbookUnloaded += spreadsheet_WorkbookUnloaded; void spreadsheet_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) { - //Hook the events here + //Hook the events here. foreach (var grid in args.GridCollection) { - grid.QueryRange += grid_QueryRange; - } + grid.QueryRange += grid_QueryRange; + } } void spreadsheet_WorkbookUnloaded(object sender, WorkbookUnloadedEventArgs args) { - //Unhook the events here + //Unhook the events here. foreach (var grid in args.GridCollection) { - grid.QueryRange -= grid_QueryRange; + grid.QueryRange -= grid_QueryRange; } } {% endhighlight %} {% endtabs %} -N> SfSpreadsheet supports virtual mode, which lets you dynamically provide data to the grid by handling an event, [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_QueryRange), for example. In virtual mode, data will be dynamically loaded into the SpreadsheetGrid on demand or when users need to view the data. +N> SfSpreadsheet supports virtual mode, which lets you dynamically provide data to the grid by handling the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_QueryRange) event. In virtual mode, data is dynamically loaded into the `SpreadsheetGrid` on demand when the user needs to view the data. ## Setting the ActiveSheet programmatically @@ -127,110 +128,110 @@ spreadsheet.SetActiveSheet("Sheet5"); ## Accessing the cell or range of cells -SfSpreadsheet allows to access a single cell or range of cells in the workbook using `IRange` interface. +SfSpreadsheet allows you to access a single cell or a range of cells in the workbook using the `IRange` interface. -The following code shows the several ways of accessing a single cell or range of cells in the `Worksheet`, +The following code shows the several ways of accessing a single cell or a range of cells in the `worksheet`: {% tabs %} {% highlight c# %} -// Access a cell by specifying cell address. +// Access a cell by specifying cell address. var cell = spreadsheet.Workbook.Worksheets[0].Range["A3"]; -// Access a cell by specifying cell row and column index. +// Access a cell by specifying cell row and column index. var cell1 = spreadsheet.Workbook.Worksheets[0].Range[3, 1]; -// Access a cells by specifying user defined name. +// Access a cell by specifying a user-defined name. var cell2 = spreadsheet.Workbook.Worksheets[0].Range["Namerange"]; -// Accessing a range of cells by specifying cell's address. +// Accessing a range of cells by specifying the cell's address. var cell3 = spreadsheet.Workbook.Worksheets[0].Range["A5:C8"]; -// Accessing a range of cells specifying cell row and column index. +// Accessing a range of cells by specifying the cell row and column index. var cell4 = spreadsheet.Workbook.Worksheets[0].Range[15, 1, 15, 3]; {% endhighlight %} {% endtabs %} -For more reference regarding accessing the range, refer [XlsIO](https://help.syncfusion.com/file-formats/xlsio/worksheet-cells-manipulation#accessing-a-cell-or-a-range) UG. +For more reference regarding accessing the range, refer to the [XlsIO](https://help.syncfusion.com/file-formats/xlsio/worksheet-cells-manipulation#accessing-a-cell-or-a-range) UG. -N> If the user has made any modifications with XlsIO range in SfSpreadsheet, then they should [refresh the view](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/working-with-sfspreadsheet#refreshing-the-view) to update the modifications in `SpreadsheetGrid`. +N> If the user has made any modifications with the XlsIO range in SfSpreadsheet, they should [refresh the view](https://help.syncfusion.com/document-processing/excel/spreadsheet/wpf/working-with-sfspreadsheet#refreshing-the-view) to update the modifications in `SpreadsheetGrid`. ## Accessing the value of a cell -SfSpreadsheet allows you to access the value of a cell by using [Value](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_Value) property of `IRange` and to get the value of the cell along with its format, [DisplayText](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_DisplayText) property can be used. +SfSpreadsheet allows you to access the value of a cell by using the [Value](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_Value) property of `IRange`. To get the value of the cell along with its format, use the [DisplayText](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_DisplayText) property. {% tabs %} {% highlight c# %} -// Access a cell value by using "Value" Property, -var cellValue = spreadsheet.Workbook.Worksheets[1].Range["A3"].Value +// Access a cell value by using the "Value" property. +var cellValue = spreadsheet.Workbook.Worksheets[1].Range["A3"].Value; -// Access a cell value by using "DisplayText" Property. +// Access a cell value by using the "DisplayText" property. var displayValue = spreadsheet.Workbook.Worksheets[1].Range[4, 1].DisplayText; {% endhighlight %} {% endtabs %} ## Setting the value or formula to a cell -In SfSpreadsheet, to update the cell value and formula programmatically, [SetCellValue](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetCellValue_Syncfusion_XlsIO_IRange_System_String_) method of [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) should be invoked and then invalidate that cell to update the view. +In SfSpreadsheet, to update the cell value or formula programmatically, invoke the [SetCellValue](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetCellValue_Syncfusion_XlsIO_IRange_System_String_) method of [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) and then invalidate that cell to update the view. The `SetCellValue` method accepts both literal values and formula strings (strings that start with `=`). {% tabs %} {% highlight c# %} var range = spreadsheet.ActiveSheet.Range[2,2]; spreadsheet.ActiveGrid.SetCellValue(range, "cellValue"); -spreadsheet.ActiveGrid.InvalidateCell(2,2); +spreadsheet.ActiveGrid.InvalidateCell(2, 2); {% endhighlight %} {% endtabs %} ## Clearing the value or formatting from a cell -SfSpreadsheet allows you to delete the contents of a cell or delete the contents along with its formatting(comments,Conditional formats,..) also. +SfSpreadsheet allows you to clear the contents of a cell or clear the contents along with its formatting (comments, conditional formats, data validations, and so on). -The following code illustrates the different way of deleting the value from a cell, +The following code illustrates the different ways of clearing the value from a cell: {% tabs %} {% highlight c# %} //To clear the contents in the range alone, spreadsheet.Workbook.Worksheets[0].Range[3, 3].Clear(); -//To clear the contents along with its formatting in the range, +//To clear the contents along with its formatting in the range, spreadsheet.Workbook.Worksheets[0].Range[3, 3].Clear(true); -//To clear the range with specified ExcelClearOptions, +//To clear the range with the specified ExcelClearOptions, spreadsheet.Workbook.Worksheets[0].Range[3, 3].Clear(ExcelClearOptions.ClearDataValidations); {% endhighlight %} {% endtabs %} -N> [ExcelClearOptions](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.ExcelClearOptions.html) is an enum which specifies the possible directions to clear the cell formats, content, comments,conditional format,data validation or clear all of them. +N> [ExcelClearOptions](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.ExcelClearOptions.html) is an enum which specifies what should be cleared from a range. Available values include: `ClearContent`, `ClearFormats`, `ClearComments`, `ClearConditionalFormats`, `ClearDataValidations`, `ClearHyperlinks`, and `ClearAll` (default; clears everything). Use `ClearAll` to clear cell content, formatting, comments, conditional formats, data validations, and hyperlinks in a single call. ## Refreshing the view -SfSpreadsheet allows you to invalidate or refresh the view either by specifying the specific range or full range. +SfSpreadsheet allows you to invalidate or refresh the view either by specifying a specific range or the full range. Use the appropriate `Invalidate*` method based on the scope of the change: -The following code demonstrates the different ways of refreshing the view, +The following code demonstrates the different ways of refreshing the view: {% tabs %} {% highlight c# %} //Invalidates the mentioned cell in the grid, spreadsheet.ActiveGrid.InvalidateCell(3, 3); -//Invalidates the range , +//Invalidates the range, var range = GridRangeInfo.Cells(5, 4, 6, 7); spreadsheet.ActiveGrid.InvalidateCell(range); //Invalidates all the cells in the grid, spreadsheet.ActiveGrid.InvalidateCells(); -//Invalidates the measurement state(layout) of grid, +//Invalidates the measurement state(layout) of the grid, spreadsheet.ActiveGrid.InvalidateVisual(); -//Invalidates the cell borders in the range, +//Invalidates only the cell borders in the range, var range = GridRangeInfo.Cells(2, 4, 6, 4); spreadsheet.ActiveGrid.InvalidateCellBorders(range); {% endhighlight %} {% endtabs %} -## Scrolling the Grid programmatically +## Scrolling the grid programmatically -SfSpreadsheet allows the user to scroll the grid into mentioned cell, by using [ScrollInView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_ScrollInView_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_) method of `SpreadsheetGrid`. +SfSpreadsheet allows the user to scroll the grid to the specified cell by using the [ScrollInView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_ScrollInView_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_) method of `SpreadsheetGrid`. The arguments are 1-based `RowColumnIndex(row, column)`. {% tabs %} {% highlight c# %} @@ -238,10 +239,11 @@ spreadsheet.ActiveGrid.ScrollInView(new RowColumnIndex(5, 5)); {% endhighlight %} {% endtabs %} -## Formula Bar +## Formula bar + +The formula bar is located above the worksheet area of SfSpreadsheet. The formula bar displays the data or formula stored in the active cell. By default, the formula bar is `Visible`. -The Formula Bar is located above the worksheet area of the SfSpreadsheet. The formula bar displays the data or formula stored in the active cell. -Users can set the visibility state of Formula Bar using [FormulaBarVisibility](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_FormulaBarVisibility) property of `SfSpreadsheet`. +You can set the visibility state of the formula bar using the [FormulaBarVisibility](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_FormulaBarVisibility) property of `SfSpreadsheet`. {% tabs %} {% highlight xaml %} @@ -254,7 +256,7 @@ spreadsheet.FormulaBarVisibility = System.Windows.Visibility.Collapsed; ## Identify whether the workbook is modified or not -`IsCellModified` property of `WorkbookImpl` is used to identify whether any cell modified in a workbook or not after importing. Since it is an internal property, access it using Reflection. +The `IsCellModified` property of `WorkbookImpl` indicates whether any cell in a workbook has been modified after importing. Because `IsCellModified` is an internal property, it must be accessed using reflection. {% tabs %} {% highlight c# %} @@ -264,22 +266,21 @@ var value = typeof(WorkbookImpl).GetProperty("IsCellModified", bindFlags).GetVal {% endhighlight %} {% endtabs %} -## Suppress message boxes in Spreadsheet - -In Spreadsheet, warning messages, error alerts are displayed while performing some actions like Excel. If you want to avoid those alerts, then set the [DisplayAlerts](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_DisplayAlerts) property to `false`. +## Suppress message boxes in spreadsheet +In SfSpreadsheet, warning messages and error alerts are displayed while performing certain actions, similar to Excel. If you want to avoid these alerts, set the [DisplayAlerts](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_DisplayAlerts) property to `false`. {% tabs %} {% highlight c# %} -//To Suppress message boxes in Spreadsheet +//To suppress message boxes in Spreadsheet spreadsheet.DisplayAlerts = false; {% endhighlight %} {% endtabs %} ## Suspend and resume formula calculation -Spreadsheet provides support to suspend the formula calculation and resume it whenever needed using the [SuspendFormulaCalculation](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_SuspendFormulaCalculation) and [ResumeFormulaCalculation](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ResumeFormulaCalculation) method. +SfSpreadsheet provides support to suspend the formula calculation and resume it whenever needed, using the [SuspendFormulaCalculation](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_SuspendFormulaCalculation) and [ResumeFormulaCalculation](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ResumeFormulaCalculation) methods. -Resuming formula calculation will recalculate all the formula cells in a workbook. This would be helpful to improve the performance when you are updating the value of more number of cells by skipping the dependent cells recalculation on each cell value changed. +Resuming the formula calculation triggers a single recalculation pass across all formula cells in the workbook. This is helpful for improving performance when you update the value of many cells, because dependent cells are not recalculated on each individual value change. {% tabs %} {% highlight c# %} @@ -291,9 +292,9 @@ spreadsheet.SuspendFormulaCalculation(); {% endhighlight %} {% endtabs %} -## Close the popup programmatically +## Close the popup programmatically -In SfSpreadsheet, popup windows are used to display the options like copy paste option, fill series option, etc. which will be closed automatically on certain actions. However you can also able to close the popup programmatically by using the [ShowHidePopup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_ShowHidePopup_System_Boolean_) method of `SpreadsheetGrid`. +In SfSpreadsheet, popup windows are used to display options like the copy-paste option, the fill series option, and so on, which are closed automatically on certain actions. However, you can also close the popup programmatically by using the [ShowHidePopup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_ShowHidePopup_System_Boolean_) method of `SpreadsheetGrid`. The popups affected include the copy-paste tag, fill series, autofill, and sort options. {% tabs %} {% highlight c# %} @@ -307,7 +308,7 @@ spreadsheet.ActiveGrid.ShowHidePopup(true); ## Identify when the active sheet is changed -SfSpreadsheet provides support to identify when the active sheet is changed by using [PropertyChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_PropertyChanged) event of SfSpreadsheet like below. +SfSpreadsheet provides support to identify when the active sheet is changed by using the [PropertyChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_PropertyChanged) event of SfSpreadsheet, as shown below. The `PropertyChanged` event is raised both when the user switches tabs in the sheet tab bar and when the active sheet is changed programmatically (for example, via `SetActiveSheet`). {% tabs %} {% highlight c# %} @@ -316,9 +317,9 @@ Spreadsheet.PropertyChanged += Spreadsheet_PropertyChanged; void Spreadsheet_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { - // when the worksheets in the workbook changed - - if(e.PropertyName == "ActiveSheet") + // When the active worksheet in the workbook changes. + + if (e.PropertyName == "ActiveSheet") { //Implement code @@ -328,4 +329,7 @@ void Spreadsheet_PropertyChanged(object sender, System.ComponentModel.PropertyCh {% endtabs %} -N> You can refer to our [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. You can also explore our [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file +## See also + +- [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour page for its groundbreaking feature representations. +- [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) to know how to render and configure the spreadsheet. \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md b/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md index 3e2a09cd39..7cfba5d2ff 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md @@ -16,13 +16,13 @@ SfSpreadsheet provides support to insert and delete the worksheets in a workbook {% tabs %} {% highlight c# %} -//Insert Sheet - spreadsheet.AddSheet(); - -//Insert sheet with name - spreadsheet.AddSheet("Sheet4", 3); +//Insert a new sheet at the end of the workbook +spreadsheet.AddSheet(); -//Delete Sheet +//Insert a sheet with a name at a specific index +spreadsheet.AddSheet("Sheet4", 3); + +//Delete a sheet by name spreadsheet.RemoveSheet("Sheet2"); {% endhighlight %} {% endtabs %} @@ -33,37 +33,39 @@ SfSpreadsheet provides support to hide and unhide the worksheets in a workbook. {% tabs %} {% highlight c# %} -//Hide Sheet +//Hide a sheet by name spreadsheet.HideSheet("Sheet 2"); -//Unhide Sheet +//Unhide a sheet by name spreadsheet.UnhideSheet("Sheet 2"); {% endhighlight %} {% endtabs %} ## Hide or unhide sheet tabs -Spreadsheet provides support to hide and unhide the all worksheet tabs in the workbook using the [ShowSheetTabs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ShowSheetTabs) property. The Default value is `true`. +SfSpreadsheet provides support to hide and unhide all the worksheet tabs in the workbook using the [ShowSheetTabs](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ShowSheetTabs) property. The default value is `true`. {% tabs %} {% highlight c# %} +//Wire up the Loaded event in the XAML page constructor or code-behind +spreadsheetControl.Loaded += SpreadsheetControl_Loaded; + private void SpreadsheetControl_Loaded(object sender, RoutedEventArgs e) { spreadsheetControl.ShowSheetTabs = false; } - {% endhighlight %} {% highlight XAML %} - + {% endhighlight %} {% endtabs %} ## Rename a worksheet -SfSpreadsheet provides support to rename a worksheet in the workbook by using [RenameSheet](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RenameSheet_System_String_) method. After invoking this method, the sheet tab enters into editing mode and now the users can change the name of the sheet in the tab. +SfSpreadsheet provides support to rename a worksheet in the workbook by using the [RenameSheet](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RenameSheet_System_String_) method. After invoking this method, the sheet tab enters editing mode so the user can change the name directly in the tab. {% tabs %} {% highlight c# %} @@ -74,11 +76,11 @@ spreadsheet.RenameSheet("Sheet1"); ### Rename a worksheet programmatically -SfSpreadsheet provides support to rename a worksheet in the workbook programmatically by using [RenameSheet](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RenameSheet_System_String_System_String_) method. +SfSpreadsheet provides support to rename a worksheet in the workbook programmatically by using the [RenameSheet](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RenameSheet_System_String_System_String_) method. {% tabs %} {% highlight c# %} -//To Rename a sheet programmatically +//Rename a sheet programmatically spreadsheet.RenameSheet("ExistingSheetName", "NewSheetName"); {% endhighlight %} {% endtabs %} @@ -88,38 +90,28 @@ spreadsheet.RenameSheet("ExistingSheetName", "NewSheetName"); ### Protecting a worksheet -SfSpreadsheet provides support to protect the worksheet with or without password. This helps to prevent a user from modifying the contents of the worksheet. The protection of worksheet can be done with [ExcelSheetProtection](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.ExcelSheetProtection.html) options also. - -The Protect sheet options are - -* LockedCells - Allows the users to select the locked cells of the protected worksheet. - -* UnLockedCells - Allows the users to select the unlocked cells of the protected worksheet. - -* FormattingCells - Allows the users to format any cell on a protected worksheet. +SfSpreadsheet provides support to protect the worksheet with or without a password. This helps to prevent a user from modifying the contents of the worksheet. The protection of the worksheet can also be done with [ExcelSheetProtection](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.ExcelSheetProtection.html) options, which is a flags enumeration — combine multiple options with the bitwise OR operator (`|`). -* FormattingRows - Allows the users to format any row on a protected worksheet. +The `ExcelSheetProtection` options are: -* FormattingColumns - Allows the users to format any column on a protected worksheet. - -* InsertingRows - Allows the users to insert rows on the protected worksheet. - -* InsertingColumns - Allows the users to insert columns on the protected worksheet. - -* InsertingHyperlinks - Allows the users to insert hyperlinks on the protected worksheet. - -* DeletingRows - Allows the users to delete rows on the protected worksheet. - -* DeletingColumns - Allows the users to delete columns on the protected worksheet. - -* Objects - Allows the users to edit the objects such as Graphic cells like charts,rich textbox, etc. +* `LockedCells` - Allows the user to select the locked cells of the protected worksheet. +* `UnLockedCells` - Allows the user to select the unlocked cells of the protected worksheet. +* `FormattingCells` - Allows the user to format any cell on a protected worksheet. +* `FormattingRows` - Allows the user to format any row on a protected worksheet. +* `FormattingColumns` - Allows the user to format any column on a protected worksheet. +* `InsertingRows` - Allows the user to insert rows on the protected worksheet. +* `InsertingColumns` - Allows the user to insert columns on the protected worksheet. +* `InsertingHyperlinks` - Allows the user to insert hyperlinks on the protected worksheet. +* `DeletingRows` - Allows the user to delete rows on the protected worksheet. +* `DeletingColumns` - Allows the user to delete columns on the protected worksheet. +* `Objects` - Allows the user to edit objects such as graphics, charts, rich textboxes, etc. {% tabs %} {% highlight c# %} //Protect the sheet with password spreadsheet.ProtectSheet(spreadsheet.ActiveSheet, "123"); -//Protect the sheet with Protection options +//Protect the sheet with protection options spreadsheet.ProtectSheet(spreadsheet.ActiveSheet, "123", ExcelSheetProtection.FormattingCells); //Unprotect the sheet @@ -129,7 +121,7 @@ spreadsheet.UnProtectSheet(spreadsheet.ActiveSheet, "123"); ### Protecting a workbook -SfSpreadsheet provides support to protect the structure and windows of a workbook. By protecting the structure, prevent a user from adding or deleting worksheets or from displaying hidden worksheets. By protecting the windows in the workbook, you can control the size of the workbook, etc. +SfSpreadsheet provides support to protect the structure and windows of a workbook. Protecting the structure prevents a user from adding or deleting worksheets, or from displaying hidden worksheets. Protecting the windows controls the size and position of the workbook window. {% tabs %} {% highlight c# %} @@ -168,20 +160,19 @@ spreadsheet.SetRowColumnHeadersVisibility(false); ## Zooming -SfSpreadsheet provides support to zoom in and zoom out of a worksheet view. The property [AllowZooming](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_AllowZooming) determines whether to allow zooming or not. +SfSpreadsheet provides support to zoom in and zoom out of a worksheet view. The [AllowZooming](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_AllowZooming) property determines whether zooming is allowed; the default value is `true`. {% tabs %} {% highlight c# %} -//zoom factor +//Set the zoom factor to 200% on Sheet1 spreadsheet.SetZoomFactor("Sheet1", 200); {% endhighlight %} {% endtabs %} -The Events associated with the Zooming are - -. [ZoomFactorChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ZoomFactorChanged) +The events associated with zooming are: -. [ZoomFactorChanging](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ZoomFactorChanging) +* [ZoomFactorChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ZoomFactorChanged) — occurs after the zoom factor changes. +* [ZoomFactorChanging](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ZoomFactorChanging) — occurs before the zoom factor changes. ## Events @@ -197,7 +188,7 @@ Occurs when the workbook is to be created in SfSpreadsheet.
{{ '[WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) ' | markdownify }} -Occur when the workbook is loaded in SfSpreadsheet.
{{ '[WorksheetAdding](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) ' | markdownify }} @@ -233,27 +224,27 @@ Occurs when the zoom factor in SfSpreadsheet is to be changed.
{{ '[ResizingColumns](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when performing the resizing columns in SfSpreadsheet.
{{ '[ResizingRows](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when performing the resizing rows in SfSpreadsheet.
{{ '[CellCommentOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when opening the comments in the cells of SfSpreadsheet.
{{ '[CellTooltipOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when opening the tool tips of cells in SfSpreadsheet.
{{ '[CellContextMenuOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when opening the context menu of the cell in SfSpreadsheet.
{{ '[QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) ' | markdownify }} -Occurs when grid queries for IRange information about a specific cell while rendering.
From eb391070f1efc2f3b26694daba1a5d4a60a1d738 Mon Sep 17 00:00:00 2001 From: RajClinton26 Date: Wed, 22 Jul 2026 21:38:34 +0530 Subject: [PATCH 3/3] WPF-Spreadsheet-UGCorrection --- .../Spreadsheet/WPF/Cell-Customization.md | 4 +- .../WPF/Compare-Classic-Spreadsheet.md | 8 ++-- .../Spreadsheet/WPF/Conditional-Formatting.md | 13 +------ .../Excel/Spreadsheet/WPF/Conversion.md | 2 +- .../Excel/Spreadsheet/WPF/Custom-Formula.md | 2 +- .../Excel/Spreadsheet/WPF/Customize-a-Cell.md | 2 +- .../Excel/Spreadsheet/WPF/Data-Management.md | 4 +- .../Excel/Spreadsheet/WPF/Formatting.md | 8 ++-- .../Excel/Spreadsheet/WPF/Formulas.md | 2 +- .../Spreadsheet/WPF/Interactive-Features.md | 2 +- .../Excel/Spreadsheet/WPF/Outline.md | 10 ++--- .../Excel/Spreadsheet/WPF/Rows-and-Columns.md | 2 +- .../Excel/Spreadsheet/WPF/Selection.md | 22 +++++------ .../Excel/Spreadsheet/WPF/Shapes.md | 37 +------------------ .../Excel/Spreadsheet/WPF/Themes.md | 2 +- .../Spreadsheet/WPF/Workbook-Operations.md | 8 ---- .../WPF/Working-with-SfSpreadsheet.md | 20 +++++----- .../Spreadsheet/WPF/Worksheet-Management.md | 14 +++---- 18 files changed, 56 insertions(+), 106 deletions(-) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md b/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md index 458569c7a2..53a0700a89 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Cell-Customization.md @@ -9,7 +9,7 @@ documentation: ug # Cell Customization in WPF Spreadsheet (SfSpreadsheet) -SfSpreadsheet supports cell customization through a data template, allowing any built-in WPF control or custom control to be hosted in a cell. Use this approach to embed interactive UI such as buttons, combo boxes, or expanders directly inside spreadsheet cells. +SfSpreadsheet supports cell customization through a data template, allowing any built-in WPF control or custom control to be hosted in a cell. To customize a cell, follow these steps: @@ -139,7 +139,7 @@ N> If you want to load the default edit element, you do not need to override the **Associate the Custom Cell Renderer with SpreadsheetGrid** -To associate the custom cell renderer with [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html), subscribe to the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_WorkbookLoaded) event of `SfSpreadsheet` (in XAML or in code-behind after the control is initialized). In the handler, initialize the `SpreadsheetTemplateCellRenderer` and add it to the renderer collection. +To associate the custom cell renderer with [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html), invoke the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_WorkbookLoaded) event of `SfSpreadsheet` (in XAML or in code-behind after the control is initialized). In the handler, initialize the `SpreadsheetTemplateCellRenderer` and add it to the renderer collection. Next, handle the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_QueryRange) event of `SpreadsheetGrid` and set the `CellType` of the particular range to "DataTemplate" to load the user-defined template. diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md b/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md index ba7edd90cf..82accdb979 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Compare-Classic-Spreadsheet.md @@ -74,22 +74,22 @@ Gets the active SpreadsheetGrid {{'[IsCustomTabItemContextMenuEnabled](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_IsCustomTabItemContextMenuEnabled)'| markdownify }} TabStyleManager -> IsCustomTabItemContextMenuEnabled -Gets or sets whether the custom context menu is enabled +Gets or sets whether the custom ContextMenu is enabled {{ '[ShowTabItemContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.Controls.TabControlExt.html#Syncfusion_Windows_Tools_Controls_TabControlExt_ShowTabItemContextMenu)' | markdownify }} TabStyleManager -> ShowTabItemContextMenu -Gets or sets whether the tab item context menu is displayed +Gets or sets whether the TabItemContextMenu is displayed {{ '[TabItemContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_TabItemContextMenu)' | markdownify }} TabStyleManager ->TabItemContextMenu -Gets or sets the context menu items for the tab item +Gets or sets the ContextMenu items for the TabItem {{ '[ActiveSheet](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_ActiveSheet)' | markdownify }} ExcelProperties->Workbook->ActiveSheet -Gets the current active sheet +Gets the current ActiveSheet {{ '[Workbook](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Workbook)' | markdownify }} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md b/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md index 086f1a4051..2cb1e073e4 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Conditional-Formatting.md @@ -11,7 +11,7 @@ documentation: ug This section explains how to apply conditional formatting rules programmatically at run time in SfSpreadsheet. -In SfSpreadsheet, to apply a conditional format to a cell or range of cells, add an [IConditionalFormat](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormat.html) to that range by using the [AddCondition](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormats.html#Syncfusion_XlsIO_IConditionalFormats_AddCondition) method, then call `InvalidateCell` on `ActiveGrid` to refresh the view. +In SfSpreadsheet, to apply a conditional format to a cell or range of cells, add an [IConditionalFormat](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormat.html) to that range by using the [AddCondition](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IConditionalFormats.html#Syncfusion_XlsIO_IConditionalFormats_AddCondition) method. {% tabs %} {% highlight c# %} @@ -40,8 +40,6 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(1)); {% endhighlight %} {% endtabs %} -> Use `SecondFormula` together with `FirstFormula` when the operator is `Between` or `NotBetween`. - ### Based on Formula or Cell References To format cells based on a formula or cell reference, set the format type to **Formula** and configure options such as the formula and background color. Then, invalidate the cells to refresh the view. @@ -79,8 +77,6 @@ spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Col(1)); To format cells based on a time period, set the format type to **TimePeriod** and configure the time period type and background color. The `Operator` property is not required for `TimePeriod`. Then, invalidate the cells to refresh the view. -Supported `CFTimePeriods` values include: `Today`, `Yesterday`, `Tomorrow`, `Last7Days`, `ThisWeek`, `LastWeek`, `ThisMonth`, `LastMonth`. - {% tabs %} {% highlight c# %} var worksheet = spreadsheet.Workbook.Worksheets[0]; @@ -101,8 +97,6 @@ Sample output To apply a conditional format based on data bars, set the format type to **DataBar** and configure the associated properties such as the bar color, `MinPoint`, and `MaxPoint`. Then, invalidate the cells to update the view. -Supported `ConditionValueType` values include: `LowestValue`, `HighestValue`, `Number`, `Percent`, `Formula`, `Automatic`,and `Percentile`. - {% tabs %} {% highlight c# %} var worksheet = spreadsheet.Workbook.Worksheets[0]; @@ -146,8 +140,6 @@ Sample output To apply a conditional format for icon sets, set the format type to **IconSet** and configure the associated properties such as the icon type and criteria. Then, invalidate the cells to update the view. -Supported `ExcelIconSetType` values include: `ThreeArrows`, `ThreeArrowsGray`, `ThreeFlags`, `ThreeTrafficLights1`, `ThreeTrafficLights2`, `ThreeSigns`, `ThreeSymbols`, `ThreeSymbols2`, `FourArrows`, `FourArrowsGray`, `FourRedToBlack`, `FourRating`, `FourTrafficLights`, `FiveArrows`, `FiveArrowsGray`, `FiveRating`, and `FiveQuarters`. - {% tabs %} {% highlight c# %} var worksheet = spreadsheet.Workbook.Worksheets[0]; @@ -166,5 +158,4 @@ Sample output > **See also:** > - [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour -> - [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) on GitHub -> - Related: [Cell Formatting](https://help.syncfusion.com/wpf/spreadsheet/cell-formatting), [Number Formatting](https://help.syncfusion.com/wpf/spreadsheet/number-formatting) \ No newline at end of file +> - [WPF Spreadsheet example](https://github.com/syncfusion/wpf-demos) on GitHub \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md b/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md index 99e36eeeaa..4de05a579a 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Conversion.md @@ -60,7 +60,7 @@ System.Diagnostics.Process.Start("Sample.pdf"); ## Convert to HTML -SfSpreadsheet supports converting the Excel workbook into an HTML page using the `SaveAsHtml` method on the underlying `IWorkbook`. The second argument accepts an `HtmlSaveOptions` instance to control how styles, images, and unsupported features are emitted. +SfSpreadsheet supports converting the Excel workbook into an HTML page using the `SaveAsHtml` method on the underlying `IWorkbook`. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md b/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md index e553e54ec8..1a0956c905 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Custom-Formula.md @@ -44,4 +44,4 @@ public string ComputeLength(string range) {% endtabs %} -N> After the formula is registered, you can also type `=Length("sample")` directly into a cell instead of calling `SetCellValue`. For more information, see the [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour or browse the [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos). \ No newline at end of file +N> For more information, see the [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) feature tour or browse the [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos). \ No newline at end of file diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md b/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md index 4f12cb745e..e920fcead7 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Customize-a-Cell.md @@ -135,7 +135,7 @@ protected override void OnInitializeEditElement(RowColumnIndex rowColumnIndex, C To associate the custom cell renderer with the [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html), handle the [WorkbookLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html) event of `SfSpreadsheet`, initialize the `SpreadsheetTemplateCellRenderer`, and add it to the renderer collection. -Handle the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) event of `SpreadsheetGrid` and set the `CellType` of a particular range to `DataTemplate` to load the user-defined template. +Invoke the [QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) event of `SpreadsheetGrid` and set the `CellType` of a particular range to `DataTemplate` to load the user-defined template. {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md b/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md index 76b4d31942..7efe8bc92c 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Data-Management.md @@ -8,7 +8,7 @@ documentation: ug --- # Data Management in WPF Spreadsheet (SfSpreadsheet) -SfSpreadsheet supports importing and exporting worksheet data to and from a `DataTable`. This is useful when binding spreadsheet data to data-bound UI controls, persisting it to a database, or exchanging it with other systems. The import and export calls delegate to the underlying `IWorksheet` provided by XlsIO. +SfSpreadsheet supports importing and exporting worksheet data to and from a `DataTable`. ## Import from DataTable @@ -30,7 +30,7 @@ spreadsheet.ActiveGrid.InvalidateCells(); {% endhighlight %} {% endtabs %} -For more details regarding importing data, please refer to the [XlsIO UG](http://help.syncfusion.com/file-formats/xlsio/working-with-data#importing-data-to-worksheets). The following related overloads are also available on `IWorksheet`: `ImportDataColumn`, `ImportDataView`, `ImportDataTable(IList)`, `BusinessObjectsToWorksheet`, and array-based imports — see the XlsIO link above for examples of each. +For more details regarding importing data, please refer to the [XlsIO UG](http://help.syncfusion.com/file-formats/xlsio/working-with-data#importing-data-to-worksheets). ## Export to DataTable diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md b/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md index 49d01b8499..e0818d384d 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Formatting.md @@ -24,7 +24,7 @@ Styles and formats defined in an Excel file are automatically imported. Users ca ## Cell Background -To apply a background color to cells at runtime, set the color on the XlsIO `IRange` and then invalidate the affected cells in `SpreadsheetGrid` to update the view. Use `Color` (OLE/Theme color) for new code; `ColorIndex` is retained for backward compatibility. +To apply a background color to cells at runtime, set the color on the XlsIO `IRange` and then invalidate the affected cells in `SpreadsheetGrid` to update the view. For a single cell, @@ -263,7 +263,7 @@ m/d/yyyy ## Built-in Styles -SfSpreadsheet supports the predefined built-in styles provided by XlsIO. [BuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.BuiltInStyles.html) is an enum that contains different styles for formatting a cell or range of cells. Common values include `Heading1`, `Heading2`, `Heading3`, `Title`, `Total`, `Accent1`, and `Accent2`. +SfSpreadsheet supports the predefined built-in styles provided by XlsIO. [BuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.BuiltInStyles.html) is an enum that contains different styles for formatting a cell or range of cells. {% tabs %} {% highlight c# %} @@ -274,7 +274,7 @@ spreadsheet.ActiveGrid.InvalidateCell(3, 1); ## Format as Table -SfSpreadsheet allows the user to format a range as a table using the built-in table styles provided by XlsIO via [TableBuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.TableBuiltInStyles.html). This applies a `ListObject` with filter, sort, and structured-reference capabilities, which is different from applying a built-in cell style (see the previous section). +SfSpreadsheet allows the user to format a range as a table using the built-in table styles provided by XlsIO via [TableBuiltInStyles](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.TableBuiltInStyles.html). {% tabs %} {% highlight c# %} @@ -293,7 +293,7 @@ N> Users need to [refresh the view](https://help.syncfusion.com/document-process ## Clear formatting -SfSpreadsheet provides support for clearing the contents of a cell along with its formatting, or for clearing specific items using the [ExcelClearOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.ExcelClearOptions.html) enum. The enum controls which elements are removed, including formats, content, comments, conditional formats, data validation, or a combination of any of them. The `Clear(true)` overload clears contents together with formatting, while `Clear(false)` clears only the contents. +SfSpreadsheet provides support for clearing the contents of a cell along with its formatting, or for clearing specific items using the [ExcelClearOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.ExcelClearOptions.html) enum. The enum controls which elements are removed, including formats, content, comments, conditional formats, data validation, or a combination of any of them. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md b/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md index d303a41c62..fdfeda0f37 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Formulas.md @@ -393,7 +393,7 @@ Returns the exponential of a complex number

IMPOWER

-Calculates a complex number raised to a supplied exponent

+Calculates a complex number raised to a supplied power

GESTEP

diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md b/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md index 3b36454438..7520aba436 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Interactive-Features.md @@ -232,7 +232,7 @@ void ActiveGrid_CellContextMenuOpening(object sender, CellContextMenuOpeningEven {% endhighlight %} {% endtabs %} -T> A custom cell context menu can also be added by assigning the customized menu items to the [CellContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CellContextMenu) property of `SpreadsheetGrid`. +T> A custom cell context menu can also be added by assigning the customized menu items to the [CellContextMenu](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_CellContextMenu) property of `SpreadsheetGrid`.For your reference, [CustomContextMenu](https://www.syncfusion.com/kb/6499/how-to-create-a-customized-cell-context-menu-of-sfspreadsheet). ## Cell Comments diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Outline.md b/Document-Processing/Excel/Spreadsheet/WPF/Outline.md index a11e19990f..ae26fe2950 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Outline.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Outline.md @@ -13,9 +13,9 @@ SfSpreadsheet provides support for Excel-style outlines that make your data easi ## Group rows and columns -SfSpreadsheet supports grouping a specified range of rows or columns in a worksheet. The `ExcelGroupBy` enum accepts `ByRows` or `ByColumns` to indicate the grouping direction. +SfSpreadsheet supports grouping a specified range of rows or columns in a worksheet. -To [Group](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Group_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows: +To [Group](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Group_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows/columns: {% tabs %} {% highlight c# %} @@ -33,7 +33,7 @@ spreadsheet.Group(spreadsheet.ActiveSheet, gridRange, ExcelGroupBy.ByColumns); SfSpreadsheet supports ungrouping a previously grouped range of rows or columns. -To [Ungroup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_UnGroup_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows: +To [Ungroup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_UnGroup_Syncfusion_XlsIO_IWorksheet_Syncfusion_UI_Xaml_CellGrid_GridRangeInfo_Syncfusion_XlsIO_ExcelGroupBy_) the rows/columns: {% tabs %} {% highlight c# %} @@ -77,11 +77,11 @@ spreadsheet.RefreshOutlines(false, true); {% endhighlight %} {% endtabs %} -> The [RefreshOutlines](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RefreshOutlines_System_Boolean_System_Boolean_) method refreshes and updates the outline indicators in SfSpreadsheet. Its first parameter refreshes row outlines; the second refreshes column outlines. +> The [RefreshOutlines](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_RefreshOutlines_System_Boolean_System_Boolean_) method refreshes and updates the outline indicators in SfSpreadsheet. ## Change outline settings -In SfSpreadsheet, you can change the position of summary rows to appear below or above the detail rows, and summary columns to appear to the left or right of the detail columns. This is useful, for example, in accounting-style reports where totals appear at the top of a group. +In SfSpreadsheet, you can change the position of summary rows to appear below or above the detail rows, and summary columns to appear to the left or right of the detail columns. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md b/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md index 0cb8f0fcff..9e959cc1db 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Rows-and-Columns.md @@ -126,7 +126,7 @@ spreadsheet.ActiveGrid.ColumnWidths.SetHidden(4, 4, false); ## Row Height and Column Width -SfSpreadsheet provides support to adjust the row height and column width. The adjusted row height and column width can also be imported from Excel. Use the [AutofitColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitColumn_System_Int32_), [AutofitRow](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitRow_System_Int32_), [AutofitColumns](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitColumns), and [AutofitRows](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IRange.html#Syncfusion_XlsIO_IRange_AutofitRows) methods of XlsIO to fit rows and columns to their content. +SfSpreadsheet provides support to adjust the row height and column width. The adjusted row height and column width can also be imported from Excel. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Selection.md b/Document-Processing/Excel/Spreadsheet/WPF/Selection.md index 9165da078e..c01b1f51f6 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Selection.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Selection.md @@ -36,7 +36,7 @@ var cell = spreadsheet.ActiveGrid.SelectionController.CurrentCell; ## Accessing the Selected Ranges -The selected ranges of the `SpreadsheetGrid` are exposed through the [SelectedRanges](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectedRanges) property. The returned object is a `GridRangeInfoList` instance. +The selected ranges of the `SpreadsheetGrid` are exposed through the [SelectedRanges](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_SelectedRanges) property. {% tabs %} {% highlight c# %} @@ -164,7 +164,7 @@ Gets the selection controller, which provides the selection of content when the {{ '[AllowSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_SfCellGrid_AllowSelection) ' | markdownify }} -Gets or sets a value indicating whether selection is allowed in the active grid. +Gets or sets a value indicating whether selection is allowed in the ActiveGrid. {{ '[ShowTouchIndicator](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html#Syncfusion_UI_Xaml_CellGrid_SelectionController_ShowTouchIndicator) ' | markdownify }} @@ -172,7 +172,7 @@ Gets or sets a value indicating whether the touch indicator is shown. {{ '[TouchHitTestPrecision](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html#Syncfusion_UI_Xaml_CellGrid_SelectionController_TouchHitTestPrecision) ' | markdownify }} -Gets or sets the distance, in device-independent pixels, of the touch precision point from the touch indicator. Default is 30. +Gets or sets the distance, of the touch precision point from the touch indicator. ### [CurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_CurrentCell) properties @@ -185,27 +185,27 @@ Description {{ '[CellRowColumnIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_CellRowColumnIndex) ' | markdownify }} -Gets the row and column index of the current cell. +Gets the row and column index of the CurrentCell. {{ '[RowIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_RowIndex) ' | markdownify }} -Gets the row index of the current cell. +Gets the row index of the CurrentCell. {{ '[ColumnIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_ColumnIndex) ' | markdownify }} -Gets the column index of the current cell. +Gets the column index of the CurrentCell. {{ '[Range](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_Range) ' | markdownify }} -Gets the range of the current cell. +Gets the range of the CurrentCell. {{ '[HasCurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_HasCurrentCell) ' | markdownify }} - Gets a value indicating whether the grid has a current cell. + Gets a value indicating whether the grid has a CurrentCell. {{ '[PreviousRowColumnIndex](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_PreviousRowColumnIndex) ' | markdownify }} -Gets the row and column index of the previous current cell. +Gets the row and column index of the previous CurrentCell. ### Methods @@ -222,11 +222,11 @@ Adds or extends the selection to the specified range. {{ '[ClearSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SelectionController.html#Syncfusion_UI_Xaml_CellGrid_SelectionController_ClearSelection)' | markdownify }} -Clears the selection and resets the current cell to A1. +Clears the selection. {{ '[MoveCurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.GridCurrentCell.html#Syncfusion_UI_Xaml_CellGrid_GridCurrentCell_MoveCurrentCell_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_System_Boolean_)' | markdownify }} -Moves the current cell to the specified row and column index. The optional needToClearSelection parameter (default true) controls whether the existing selection is cleared. +Moves the current cell to the specified row and column index. ## Key Navigation diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md b/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md index 6838b31256..48cc4a9b74 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Shapes.md @@ -23,10 +23,6 @@ Create an instance of Syncfusion.UI.Xaml.SpreadsheetHelper.[GraphicChartCellRend {% tabs %} {% highlight c# %} -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; -using Syncfusion.UI.Xaml.SpreadsheetHelper; - public MainWindow() { InitializeComponent(); @@ -43,10 +39,6 @@ For adding charts in SfSpreadsheet at runtime, use the [AddChart](https://help.s {% tabs %} {% highlight c# %} -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; -using Syncfusion.XlsIO; - var chart = spreadsheet.AddChart(spreadsheet.ActiveSheet); object[] Y_values = new object[] { 200, 100, 100 }; object[] X_values = new object[] { "Total Income", "Expenses", "Profit" }; @@ -77,10 +69,6 @@ Create an instance of Syncfusion.UI.Xaml.SpreadsheetHelper.[SparklineCellRendere {% tabs %} {% highlight c# %} -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; -using Syncfusion.UI.Xaml.SpreadsheetHelper; - public MainWindow() { InitializeComponent(); @@ -97,10 +85,6 @@ SfSpreadsheet provides support to import images in `SpreadsheetGrid`. To add an {% tabs %} {% highlight c# %} -using Syncfusion.UI.Xaml.Grid.ScrollAxis; -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; - var worksheet = spreadsheet.ActiveSheet; var stream = typeof(MainWindow).Assembly.GetManifestResourceStream("GraphicCellDemo.Data.Sample.jpg"); var shape = spreadsheet.AddImage(worksheet, new RowColumnIndex(5, 5), stream); @@ -121,11 +105,6 @@ SfSpreadsheet provides support to import RichTextBox content in `SpreadsheetGrid {% tabs %} {% highlight c# %} -using System.Windows; -using Syncfusion.UI.Xaml.Grid.ScrollAxis; -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; - var rtfText = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset1 Calibri;}{\\f1\\fnil\\fcharset1 Calibri;}}{\\colortbl;\\red0\\green0\\blue0;\\red255\\green0\\blue0;}{\\f0\\fs22\\b\\cf1\\u83*\\u121*\\u110*\\u99*\\u102*\\u117*\\u115*\\u105*\\u111*\\u110*\\u32*\\b0} {\\f1\\fs22\\cf2\\u83*\\u111*\\u102*\\u116*\\u119*\\u97*\\u114*\\u101*\\u32*}{\\f1\\fs22\\cf1\\u80*\\u118*\\u116*\\u46*\\u32*\\u76*\\u116*\\u100*}}"; var textBox = spreadsheet.AddTextBox(spreadsheet.ActiveSheet, new RowColumnIndex(5, 5), new Size(200, 200), rtfText) as TextBoxShapeImpl; @@ -141,11 +120,6 @@ SfSpreadsheet allows the user to access the selected shapes and modify their pro {% tabs %} {% highlight c# %} -using System.Drawing; -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; -using Syncfusion.XlsIO; - var selectedShape = spreadsheet.ActiveGrid.GraphicModel.SelectedShapes; for(int i = 0; i < selectedShape.Count ; i++) @@ -176,10 +150,6 @@ Users can select a shape programmatically by using the [AddSelectedShapes](https {% tabs %} {% highlight c# %} -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; -using Syncfusion.XlsIO.Implementation.Shapes; - var shape = spreadsheet.ActiveSheet.Shapes[2] as ShapeImpl; spreadsheet.ActiveGrid.GraphicModel.AddSelectedShapes(shape); {% endhighlight %} @@ -191,9 +161,6 @@ Users can clear the selection from the shapes and move the selection to the grid {% tabs %} {% highlight c# %} -using Syncfusion.UI.Xaml.Spreadsheet; -using Syncfusion.UI.Xaml.Spreadsheet.GraphicCells; - spreadsheet.ActiveGrid.GraphicModel.ClearSelection(); {% endhighlight %} {% endtabs %} @@ -201,5 +168,5 @@ spreadsheet.ActiveGrid.GraphicModel.ClearSelection(); ## See Also -- [WPF Spreadsheet Editor](https://www.syncfusion.com/wpf-controls/spreadsheet) — feature tour -- [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos) — render and configure the spreadsheet +- [WPF Spreadsheet Editor feature tour](https://www.syncfusion.com/wpf-controls/spreadsheet) +- [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Themes.md b/Document-Processing/Excel/Spreadsheet/WPF/Themes.md index 934c7c4f14..8898765643 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Themes.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Themes.md @@ -42,4 +42,4 @@ Refer to the below links to apply themes for the SfSpreadsheet, ## See Also * [WPF Spreadsheet feature tour](https://www.syncfusion.com/wpf-controls/spreadsheet) -* [WPF Spreadsheet examples on GitHub](https://github.com/Syncfusion-Samples/Syncfusion-WPF-SpreadsheetExamples) +* [WPF Spreadsheet examples on GitHub](https://github.com/syncfusion/wpf-demos) diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md b/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md index ece3f3b901..6b523fe76f 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Workbook-Operations.md @@ -14,14 +14,6 @@ This section explains how to manage Excel workbooks in SfSpreadsheet, including A new workbook can be created by using the [Create](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Create_System_Int32_) method with a specified number of worksheets. By default, a workbook will be created with a single worksheet. -**Parameters** - -| Parameter | Type | Description | -|-----------|------|-------------| -| `sheetCount` | `int` | The number of worksheets to add to the new workbook. If omitted, a single worksheet is created. | - -**Return value:** `void` - {% tabs %} {% highlight c# tabtitle="MainWindow.xaml.cs" %} spreadsheet.Create(2); diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md b/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md index 4ed8897bdc..2172f7a420 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Working-with-SfSpreadsheet.md @@ -14,7 +14,7 @@ This section explains how to access the worksheet, grid, and the events associat ## Accessing the worksheet -A __workbook__ is an Excel document in SfSpreadsheet. It is an object that exposes the [IWorkbook](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorkbook.html) interface. The currently loaded workbook in SfSpreadsheet can be accessed by using the [Workbook](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Workbook) property of SfSpreadsheet. The Workbook property returns an IWorkbook instance and is non-null only after a workbook has been loaded. +A __workbook__ is an Excel document in SfSpreadsheet. It is an object that exposes the [IWorkbook](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.IWorkbook.html) interface. The currently loaded workbook in SfSpreadsheet can be accessed by using the [Workbook](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_Workbook) property of SfSpreadsheet. A workbook consists of one or more worksheets stored within the worksheet collection. The worksheets in the collection can be accessed in the following ways: @@ -68,11 +68,11 @@ void spreadsheet_WorksheetRemoved(object sender, WorksheetRemovedEventArgs args) {% endhighlight %} {% endtabs %} -You can also access each `SpreadsheetGrid` in SfSpreadsheet in two ways: by passing the particular sheet name in the [GridCollection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_GridCollection) or by iterating the `GridCollection` exposed on the `WorkbookLoadedEventArgs` of the `WorkbookLoaded` event. `GridCollection` is a `Dictionary` keyed by sheet name. +You can also access each `SpreadsheetGrid` in SfSpreadsheet in two ways: by passing the particular sheet name in the [GridCollection](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_GridCollection) or by invoking `WorkbookLoaded` event of SfSpreadsheet. ### By using sheet name -For reference, this example sets the row and column count dynamically for the second sheet in the workbook. A new workbook contains a single default sheet, so you must add a second sheet (for example, via `spreadsheet.Workbook.Worksheets.Add("Sheet2")`) before accessing `Worksheets[1]`. +For reference, this example sets the row and column count dynamically for the second sheet in the workbook. {% tabs %} {% highlight c# %} @@ -171,7 +171,7 @@ var displayValue = spreadsheet.Workbook.Worksheets[1].Range[4, 1].DisplayText; ## Setting the value or formula to a cell -In SfSpreadsheet, to update the cell value or formula programmatically, invoke the [SetCellValue](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetCellValue_Syncfusion_XlsIO_IRange_System_String_) method of [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) and then invalidate that cell to update the view. The `SetCellValue` method accepts both literal values and formula strings (strings that start with `=`). +In SfSpreadsheet, to update the cell value or formula programmatically, invoke the [SetCellValue](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_SetCellValue_Syncfusion_XlsIO_IRange_System_String_) method of [SpreadsheetGrid](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) and then invalidate that cell to update the view. {% tabs %} {% highlight c# %} @@ -200,11 +200,11 @@ spreadsheet.Workbook.Worksheets[0].Range[3, 3].Clear(ExcelClearOptions.ClearData {% endhighlight %} {% endtabs %} -N> [ExcelClearOptions](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.ExcelClearOptions.html) is an enum which specifies what should be cleared from a range. Available values include: `ClearContent`, `ClearFormats`, `ClearComments`, `ClearConditionalFormats`, `ClearDataValidations`, `ClearHyperlinks`, and `ClearAll` (default; clears everything). Use `ClearAll` to clear cell content, formatting, comments, conditional formats, data validations, and hyperlinks in a single call. +N> [ExcelClearOptions](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.ExcelClearOptions.html) is an enum which specifies the possible directions to clear the cell formats, content, comments,conditional format,data validation or clear all of them. ## Refreshing the view -SfSpreadsheet allows you to invalidate or refresh the view either by specifying a specific range or the full range. Use the appropriate `Invalidate*` method based on the scope of the change: +SfSpreadsheet allows you to invalidate or refresh the view either by specifying a specific range or the full range. The following code demonstrates the different ways of refreshing the view: @@ -231,7 +231,7 @@ spreadsheet.ActiveGrid.InvalidateCellBorders(range); ## Scrolling the grid programmatically -SfSpreadsheet allows the user to scroll the grid to the specified cell by using the [ScrollInView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_ScrollInView_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_) method of `SpreadsheetGrid`. The arguments are 1-based `RowColumnIndex(row, column)`. +SfSpreadsheet allows the user to scroll the grid to the specified cell by using the [ScrollInView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html#Syncfusion_UI_Xaml_CellGrid_ScrollInView_Syncfusion_UI_Xaml_Grid_ScrollAxis_RowColumnIndex_) method of `SpreadsheetGrid`. {% tabs %} {% highlight c# %} @@ -241,7 +241,7 @@ spreadsheet.ActiveGrid.ScrollInView(new RowColumnIndex(5, 5)); ## Formula bar -The formula bar is located above the worksheet area of SfSpreadsheet. The formula bar displays the data or formula stored in the active cell. By default, the formula bar is `Visible`. +The formula bar is located above the worksheet area of SfSpreadsheet. The formula bar displays the data or formula stored in the active cell. You can set the visibility state of the formula bar using the [FormulaBarVisibility](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_FormulaBarVisibility) property of `SfSpreadsheet`. @@ -294,7 +294,7 @@ spreadsheet.SuspendFormulaCalculation(); ## Close the popup programmatically -In SfSpreadsheet, popup windows are used to display options like the copy-paste option, the fill series option, and so on, which are closed automatically on certain actions. However, you can also close the popup programmatically by using the [ShowHidePopup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_ShowHidePopup_System_Boolean_) method of `SpreadsheetGrid`. The popups affected include the copy-paste tag, fill series, autofill, and sort options. +In SfSpreadsheet, popup windows are used to display options like the copy-paste option, the fill series option, and so on, which are closed automatically on certain actions. However, you can also close the popup programmatically by using the [ShowHidePopup](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html#Syncfusion_UI_Xaml_Spreadsheet_SpreadsheetGrid_ShowHidePopup_System_Boolean_) method of `SpreadsheetGrid`. {% tabs %} {% highlight c# %} @@ -308,7 +308,7 @@ spreadsheet.ActiveGrid.ShowHidePopup(true); ## Identify when the active sheet is changed -SfSpreadsheet provides support to identify when the active sheet is changed by using the [PropertyChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_PropertyChanged) event of SfSpreadsheet, as shown below. The `PropertyChanged` event is raised both when the user switches tabs in the sheet tab bar and when the active sheet is changed programmatically (for example, via `SetActiveSheet`). +SfSpreadsheet provides support to identify when the active sheet is changed by using the [PropertyChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_PropertyChanged) event of SfSpreadsheet, as shown below. {% tabs %} {% highlight c# %} diff --git a/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md b/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md index 7cfba5d2ff..9395dd3090 100644 --- a/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md +++ b/Document-Processing/Excel/Spreadsheet/WPF/Worksheet-Management.md @@ -90,7 +90,7 @@ spreadsheet.RenameSheet("ExistingSheetName", "NewSheetName"); ### Protecting a worksheet -SfSpreadsheet provides support to protect the worksheet with or without a password. This helps to prevent a user from modifying the contents of the worksheet. The protection of the worksheet can also be done with [ExcelSheetProtection](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.ExcelSheetProtection.html) options, which is a flags enumeration — combine multiple options with the bitwise OR operator (`|`). +SfSpreadsheet provides support to protect the worksheet with or without a password. This helps to prevent a user from modifying the contents of the worksheet. The protection of the worksheet can also be done with [ExcelSheetProtection](https://help.syncfusion.com/cr/wpf/Syncfusion.XlsIO.ExcelSheetProtection.html) options. The `ExcelSheetProtection` options are: @@ -160,7 +160,7 @@ spreadsheet.SetRowColumnHeadersVisibility(false); ## Zooming -SfSpreadsheet provides support to zoom in and zoom out of a worksheet view. The [AllowZooming](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_AllowZooming) property determines whether zooming is allowed; the default value is `true`. +SfSpreadsheet provides support to zoom in and zoom out of a worksheet view. The [AllowZooming](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SfSpreadsheet.html#Syncfusion_UI_Xaml_Spreadsheet_SfSpreadsheet_AllowZooming) property determines whether zooming is allowed. {% tabs %} {% highlight c# %} @@ -224,23 +224,23 @@ Occurs when the zoom factor in SfSpreadsheet is to be changed. {{ '[ResizingColumns](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when columns are resized in SfSpreadsheet. +Occurs when performing the resizing columns in SfSpreadsheet. {{ '[ResizingRows](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when rows are resized in SfSpreadsheet. +Occurs when performing the resizing rows in SfSpreadsheet. {{ '[CellCommentOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when a cell comment is opened in SfSpreadsheet. +Occurs when opening the comments in the cells of in SfSpreadsheet. {{ '[CellTooltipOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when a cell tooltip is opened in SfSpreadsheet. +Occurs when opening the tool tips of cells in SfSpreadsheet. {{ '[CellContextMenuOpening](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.SfCellGrid.html) ' | markdownify }} -Occurs when the context menu of a cell is opened in SfSpreadsheet. +Occurs when opening the context menu of a cell in SfSpreadsheet. {{ '[QueryRange](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Spreadsheet.SpreadsheetGrid.html) ' | markdownify }}