|
1 | 1 | --- |
2 | 2 | layout: post |
3 | | -title: Managing Cell Ranges in Blazor Spreadsheet component | Syncfusion |
4 | | -description: Checkout and learn to manage cell range features such as formatting, autofill, and clear options in the Syncfusion Blazor Spreadsheet component and more. |
| 3 | +title: Managing Cell Ranges in the Blazor Spreadsheet Component | Syncfusion |
| 4 | +description: Check out and learn to manage cell range features such as formatting, autofill, and clear options in the Syncfusion Blazor Spreadsheet component and more. |
5 | 5 | platform: document-processing |
6 | 6 | control: Spreadsheet |
7 | 7 | documentation: ug |
8 | 8 | --- |
9 | 9 |
|
10 | 10 | # Managing Cell Ranges in Blazor Spreadsheet component |
11 | | - |
12 | | -A cell range refers to a group of selected cells in a Spreadsheet that can be manipulated or processed collectively. |
| 11 | +A cell range is a set of selected cells in a Spreadsheet, typically specified using A1 notation (for example, `A1:B10`). A range may be a single cell or a contiguous block of cells that can be manipulated or processed collectively. |
13 | 12 |
|
14 | 13 | ## Cell formatting |
15 | 14 |
|
16 | | -Cell formatting enhances the visual presentation of data in a Spreadsheet by applying styles such as font changes, colors, borders, and alignment to individual cells or cell ranges. This helps in organizing and emphasizing important information effectively. |
| 15 | +Cell formatting enhances the visual presentation of data by applying styles such as font changes, colors, borders, and alignment to individual cells or cell ranges. This helps organize content and emphasize important information for faster interpretation. |
17 | 16 |
|
18 | 17 | Cell formatting options include: |
19 | 18 |
|
20 | 19 | * **Bold** - Applies a heavier font weight to make the text stand out in the Spreadsheet. |
21 | 20 |
|
22 | 21 | * **Italic** - Slants the text to give it a distinct look, often used for emphasis or to highlight differences. |
23 | 22 |
|
24 | | -* **Underline** - Adds a line below the text, commonly used for emphasis or to indicate hyperlinks. |
| 23 | +* **Underline** - Adds a line below the text, commonly used for emphasis or to indicate hyperlinks. |
25 | 24 |
|
26 | | -* **Strikethrough** - Draws a line through the text, often used to show completed tasks or outdated information. |
| 25 | +* **Strikethrough** - Draws a line through the text, often used to show completed tasks or outdated information. |
27 | 26 |
|
28 | | -* **Font Family** - Changes the typeface of the text (e.g., Arial, Calibri, Times New Roman, and more) to enhance readability or visual appeal. |
| 27 | +* **Font Family** - Changes the typeface of the text (e.g., Arial, Calibri, Times New Roman, and more) to enhance readability or visual appeal. |
29 | 28 |
|
30 | | -* **Font Size** - Adjusts the size of the text to create visual hierarchy or improve readability in the Spreadsheet. |
| 29 | +* **Font Size** - Adjusts the size of the text to create visual hierarchy or improve readability in the Spreadsheet. |
31 | 30 |
|
32 | | -* **Font Color** - Changes the color of the text to improve visual hierarchy or to organize information using color codes. |
| 31 | +* **Font Color** - Changes the color of the text to improve visual hierarchy or to organize information using color codes. |
33 | 32 |
|
34 | | -* **Fill Color** - Adds color to the cell background to visually organize data or highlight important information. |
| 33 | +* **Fill Color** - Adds color to the cell background to visually organize data or highlight important information. |
35 | 34 |
|
36 | | -* **Horizontal Alignment** - Controls the position of text from left to right within a cell. Options include: |
| 35 | +* **Horizontal Alignment** - Controls the position of text from left to right within a cell. Options include: |
37 | 36 | * **Left** - Default for text |
38 | 37 | * **Center** - Useful for headings |
39 | 38 | * **Right** - Default for numbers |
40 | 39 |
|
41 | | -* **Vertical Alignment** - Controls the position of text from top to bottom within a cell. Options include: |
| 40 | +* **Vertical Alignment** - Controls the position of text from top to bottom within a cell. Options include: |
42 | 41 | * **Top** – Aligns content to the top of the cell |
43 | 42 | * **Middle** – Centers content vertically |
44 | 43 | * **Bottom** – Default alignment |
45 | 44 |
|
46 | | -* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. |
| 45 | +* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. |
47 | 46 |
|
48 | | -Cell formatting can be applied to or removed from a cell or range of cells by using the formatting options available in the Ribbon toolbar under the **Home** tab. |
| 47 | +Cell formatting can be applied or removed from a cell or range by using the options available in the component's built-in **Ribbon** under the **Home** tab. |
49 | 48 |
|
50 | 49 | ## Autofill |
51 | 50 |
|
52 | | -Autofill is used to fill cells with data based on adjacent cells. It follows patterns from adjacent cells when available, eliminating the need to enter repeated data manually. The [AllowAutofill](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowAutofill) property can be used to enable or disable the autofill support. |
| 51 | +Autofill is used to fill cells with data that follows a pattern or is based on data in other cells. It helps avoid entering repetitive data manually. The [AllowAutofill](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowAutofill) property can be used to enable or disable this feature. |
53 | 52 |
|
54 | | -> * The default value of the `AllowAutofill` property is **true**. |
| 53 | +* The default value of the `AllowAutofill` property is **true**. |
55 | 54 |
|
56 | 55 | Autofill can be performed in one of the following ways: |
57 | 56 |
|
58 | | -* Drag and drop the cell using the fill handle element. |
59 | | -* Use the [AutofillAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AutofillAsync_System_String_System_String_) method programmatically. |
| 57 | +* Drag and drop the cell using the fill handle element. |
| 58 | +* Use the [AutofillAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AutofillAsync_System_String_System_String_) method programmatically. |
60 | 59 |
|
61 | | -The available parameters in the `AutofillAsync()` method are: |
| 60 | +The `AutofillAsync()` method accepts string parameters in A1 notation for `fillRange` and `dataRange`. The available parameters are: |
62 | 61 |
|
63 | 62 | | Parameter | Type | Description | |
64 | 63 | | -- | -- | -- | |
65 | | -| fillRange | string | Specifies the fill range. | |
66 | | -| dataRange | string | Specifies the data range. | |
67 | | -| direction | string | Specifies the direction ("Up", "Right", "Down", and "Left") to be filled. | |
| 64 | +| fillRange | string | Specifies the fill range in A1 notation (e.g., "A1:A5"). | |
| 65 | +| dataRange | string | Specifies the source data range in A1 notation (e.g., "B1:B5"). | |
| 66 | +| direction | string | Specifies the direction to be filled ("Up", "Right", "Down", or "Left"). | |
68 | 67 |
|
69 | 68 | ### Implementing autofill programmatically |
70 | 69 |
|
@@ -210,21 +209,21 @@ The event uses the [AutofillActionEndEventArgs](https://help.syncfusion.com/cr/b |
210 | 209 |
|
211 | 210 | ## Clear |
212 | 211 |
|
213 | | -Clear support helps clear the cell contents (formulas and data) and formats (including number formats) in a Spreadsheet. When **Clear All** is applied, both the contents and the formats will be cleared simultaneously. |
| 212 | +The clear functionality helps remove cell contents (formulas and data), formats (including number formats), and hyperlinks from a selected range. |
214 | 213 |
|
215 | 214 | ### Applying the clear functionality |
216 | 215 |
|
217 | 216 | The clear support can be applied using the following way: |
218 | 217 |
|
219 | | -* Select the **Clear** icon in the Ribbon toolbar under the **Home** tab. |
| 218 | +You can apply the clear functionality by selecting the **Clear** icon in the **Ribbon** under the **Home** tab. |
220 | 219 |
|
221 | | -| Options | Uses | |
| 220 | +| Option | Use | |
222 | 221 | | -- | -- | |
223 | | -| **Clear All** | Used to clear all contents, formats, and hyperlinks. | |
224 | | -| **Clear Formats** | Used to clear the formats (including number formats) in a cell. | |
225 | | -| **Clear Contents** | Used to clear the contents (formulas and data) in a cell. | |
226 | | -| **Clear Hyperlinks** | Used to clear the hyperlink in a cell. | |
| 222 | +| **Clear All** | Clears all contents, formats, and hyperlinks. | |
| 223 | +| **Clear Formats** | Clears only the formatting from the selected cells. | |
| 224 | +| **Clear Contents** | Clears only the contents (formulas and data) from the selected cells. | |
| 225 | +| **Clear Hyperlinks** | Clears only the hyperlinks from the selected cells. | |
227 | 226 |
|
228 | 227 | The following image displays the clear options available in the Ribbon toolbar under the **Home** tab of the Blazor Spreadsheet. |
229 | 228 |
|
230 | | - |
| 229 | + |
0 commit comments