You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/Excel/Spreadsheet/Blazor/worksheet.md
+5-53Lines changed: 5 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,11 +74,11 @@ This method inserts one or more sheets at a specified position in the workbook w
74
74
75
75
### Get Active Worksheet Programmatically
76
76
77
-
Use the [GetActiveWorksheet](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_GetActiveWorksheet) method to retrieve the currently active worksheet in the Spreadsheet component. This is particularly useful to perform operations relative to the current sheet selection. The method returns key properties of the active worksheet, such as its name, index, size (row and column counts), current active cell, and selected range. Returns null if no active worksheet is available.
77
+
The [GetActiveWorksheet](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_GetActiveWorksheet) method retrieves properties of the active worksheet. This method is useful when it is necessary to obtain details about the currently active sheet. If no worksheet is active, this method returns null.
78
78
79
79
**Retrieve the active worksheet**
80
80
81
-
This approach fetches the worksheet that is currently active (selected), enabling access to its properties or performing operations programmatically (for example, reading its name or ID, or using it as a context for further actions).
81
+
This method retrieves details of the currently active worksheet. Properties of the active worksheet, such as sheet name, index, or selected range, can be accessed for diagnostics, automation, or integration with other logic.
82
82
83
83
{% tabs %}
84
84
{% highlight razor %}
@@ -108,23 +108,20 @@ This approach fetches the worksheet that is currently active (selected), enablin
108
108
{% endhighlight %}
109
109
{% endtabs %}
110
110
111
-
112
-
113
111
### Get Worksheet Data Programmatically
114
112
115
-
Use the [GetData](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_GetData_System_String_) method to retrieve data from a worksheet, either from a single cell or a specified range. This API returns key information about each cell in the given address, making it ideal for extracting and processing spreadsheet data programmatically.
113
+
The [GetData](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_GetData_System_String_) method retrieves content from the worksheet. This method provides data as a dictionary, where each entry consists of a cell address and its associated `CellData` object. The returned data includes the actual value, number format, display text, wrap and lock status, hyperlinks, and calculated style of each cell in the target area. If the specified cell address is invalid or not set, the method returns null.
116
114
117
115
**Retrieve cell or range data from an active worksheet**
118
116
119
-
This method returns a dictionary where each key is a cell's address and its value is a `CellData` object. The returned data includes the raw value, number format, display text (with formatting, if any), wrap/lock status, hyperlink (if applicable), and calculated style. If no cell address is given, or if it is invalid, the result will be null.
117
+
Call this method by passing the desired cell or range as the address. For example, provide a reference such as "A1" for a single cell, "A2:B5" for a range, or "Sheet1!A2:B5" to target a range on a specific sheet. The result can be iterated to read individual cell data for further processing, logging, or custom display.
120
118
121
119
| Parameter | Type | Description |
122
120
| :-- | :-- | :-- |
123
-
| cellAddress | string |The address of the cell or range to read. Can use simple A1 (e.g., "A1"), range (e.g., "A2:B5"), or a sheet-qualified reference (e.g., "Sheet1!A2:B5"). If omitted or invalid, returns null. |
121
+
| cellAddress | string |Specifies the cell or range to read. Supports addresses such as "A1", "A2:B5", or "Sheet1!A2:B5". If omitted or invalid, the return value is null. |
124
122
125
123
{% tabs %}
126
124
{% highlight razor %}
127
-
128
125
@using Syncfusion.Blazor.Spreadsheet
129
126
130
127
<button @onclick="GetData">Get Data</button>
@@ -151,51 +148,6 @@ This method returns a dictionary where each key is a cell's address and its valu
151
148
{% endhighlight %}
152
149
{% endtabs %}
153
150
154
-
155
-
156
-
**Get cell or range data**
157
-
158
-
This method retrieves data for a single cell or a selected range, returning a dictionary where each key is a cell's address and each value is a `CellData` object. This object contains important cell properties like its raw value, number format, formatted display text (if a format is applied), wrap text status, locked status, any hyperlinks (if applicable and not a formula), and computed style. If the `cellAddress` is null or contains only whitespace, this method returns null.
159
-
160
-
| Parameter | Type | Description |
161
-
| :-- | :-- | :-- |
162
-
| cellAddress | string | Specifies the cell or range to read. Supports A1 addresses (for example, "A1"), ranges (for example, "A2:B5"), or sheet-qualified references (for example, "Sheet1!A1" or "Sheet1!A2:B5"). If a sheet name is specified, data is read from that sheet; otherwise, the active sheet is used. Null or whitespace results in no data being returned. |
**Insert a single sheet with a user-defined name**
200
152
201
153
This method adds one sheet at a specific position with a user-defined name. Each call to this method adds only one sheet. Using meaningful names like "Budget" or "Inventory" makes the workbook easier to understand. If a negative index value is provided, the method will exit without adding any sheet.
0 commit comments