Skip to content

Commit 116a897

Browse files
Merge branch 'development' into EJ2-981284-jsonObject
2 parents 8abb08b + 22b808b commit 116a897

File tree

1,264 files changed

+66047
-17427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,264 files changed

+66047
-17427
lines changed

Document-Processing-toc.html

Lines changed: 365 additions & 73 deletions
Large diffs are not rendered by default.

Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ Cell formatting options include:
4242
* **Middle** – Centers content vertically
4343
* **Bottom** – Default alignment
4444

45-
* **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. To enable text wrapping:
46+
1. Select the target cell or range (e.g., C5).
47+
2. Go to the Home tab.
48+
3. Click Wrap Text in the ribbon to toggle text wrapping for the selected cells.
4649

4750
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.
4851

Document-Processing/Excel/Spreadsheet/Blazor/clipboard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ This event is applicable in scenarios that require control over paste operations
587587

588588
@using Syncfusion.Blazor.Spreadsheet
589589

590-
<SfSpreadsheet DataSource="DataSourceBytes" Pasting="OnPasting">
590+
<SfSpreadsheet DataSource="DataSourceBytes"Pasting="OnPasting">
591591
<SpreadsheetRibbon></SpreadsheetRibbon>
592592
</SfSpreadsheet>
593593

Document-Processing/Excel/Spreadsheet/Blazor/hyperlink.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ The event uses the [HyperlinkCreatingEventArgs](https://help.syncfusion.com/cr/b
257257

258258
@using Syncfusion.Blazor.Spreadsheet
259259

260-
<SfSpreadsheet DataSource="DataSourceBytes" HyperlinkCreating="OnHyperlinkCreating">
260+
<SfSpreadsheet DataSource="DataSourceBytes" HyperlinkCreating="OnHyperlinkCreating" >
261261
<SpreadsheetRibbon></SpreadsheetRibbon>
262262
</SfSpreadsheet>
263263

@@ -365,7 +365,7 @@ The [HyperlinkClickEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.B
365365

366366
@using Syncfusion.Blazor.Spreadsheet
367367

368-
<SfSpreadsheet DataSource="DataSourceBytes" HyperlinkClick="OnHyperlinkClick">
368+
<SfSpreadsheet DataSource="DataSourceBytes" HyperlinkClick="OnHyperlinkClick" >
369369
<SpreadsheetRibbon></SpreadsheetRibbon>
370370
</SfSpreadsheet>
371371

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
layout: post
3+
title: Rows and columns in Blazor Spreadsheet component | Syncfusion
4+
description: Checkout and learn here all about Rows and columns in the Syncfusion Blazor Spreadsheet component and more.
5+
platform: document-processing
6+
control: Spreadsheet
7+
documentation: ug
8+
---
9+
10+
# Rows and columns in Blazor Spreadsheet component
11+
12+
Spreadsheet is a tabular format consisting of rows and columns. The intersection point of rows and columns are called as cells. The list of operations that you can perform in rows and columns are,
13+
14+
* Insert
15+
* Setting Column and Row Count
16+
17+
## Insert
18+
19+
You can insert rows or columns anywhere in a spreadsheet.
20+
21+
### Row
22+
23+
The rows can be inserted in the following ways,
24+
25+
* Using [`InsertRowAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_InsertRowAsync_System_Int32_System_Int32_System_Object_Syncfusion_Blazor_Spreadsheet_RowPosition_) method, you can insert the rows once the component is loaded.
26+
* Using context menu, insert the rows in the desired position.
27+
28+
The following code example shows the options for inserting rows in the spreadsheet.
29+
30+
{% tabs %}
31+
{% highlight razor tabtitle="Index.razor" %}
32+
33+
@using Syncfusion.Blazor.Spreadsheet
34+
@using Syncfusion.Blazor.Buttons
35+
36+
<SfButton OnClick="InsertRowsHandler" Content="Insert Rows"></SfButton>
37+
<SfSpreadsheet @ref="@SpreadsheetInstance" DataSource="DataSourceBytes">
38+
<SpreadsheetRibbon></SpreadsheetRibbon>
39+
</SfSpreadsheet>
40+
41+
@code {
42+
public byte[] DataSourceBytes { get; set; }
43+
public SfSpreadsheet SpreadsheetInstance;
44+
45+
protected override void OnInitialized()
46+
{
47+
string filePath = "wwwroot/Sample.xlsx";
48+
DataSourceBytes = File.ReadAllBytes(filePath);
49+
}
50+
51+
public async Task InsertRowsHandler()
52+
{
53+
// Insert 2 rows above row index 0 in the active sheet
54+
await SpreadsheetInstance.InsertRowAsync(0, 2);
55+
56+
// Insert 3 rows below row index 2 in the sheet named "Sheet2"
57+
await SpreadsheetInstance.InsertRowAsync(2, 3, "Sheet2", RowPosition.Below);
58+
59+
// Insert 1 row above row index 1 in the active sheet
60+
await SpreadsheetInstance.InsertRowAsync(1, 1, null, RowPosition.Above);
61+
62+
// Insert 4 rows below row index 3 in the sheet at index 3
63+
await SpreadsheetInstance.InsertRowAsync(3, 4, 3, RowPosition.Below);
64+
}
65+
}
66+
67+
{% endhighlight %}
68+
{% endtabs %}
69+
70+
### Column
71+
72+
The columns can be inserted in the following ways,
73+
74+
* Using [`InsertColumnAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_InsertColumnAsync_System_Int32_System_Int32_System_Object_Syncfusion_Blazor_Spreadsheet_ColumnPosition_) method, you can insert the columns once the component is loaded.
75+
* Using context menu, insert the columns in the desired position.
76+
77+
The following code example shows the options for inserting columns in the spreadsheet.
78+
79+
{% tabs %}
80+
{% highlight razor tabtitle="Index.razor" %}
81+
82+
@using Syncfusion.Blazor.Spreadsheet
83+
@using Syncfusion.Blazor.Buttons
84+
85+
<SfButton OnClick="InsertColumnsHandler" Content="Insert Columns"></SfButton>
86+
<SfSpreadsheet @ref="@SpreadsheetInstance" DataSource="DataSourceBytes">
87+
<SpreadsheetRibbon></SpreadsheetRibbon>
88+
</SfSpreadsheet>
89+
90+
@code {
91+
public byte[] DataSourceBytes { get; set; }
92+
public SfSpreadsheet SpreadsheetInstance;
93+
94+
protected override void OnInitialized()
95+
{
96+
string filePath = "wwwroot/Sample.xlsx";
97+
DataSourceBytes = File.ReadAllBytes(filePath);
98+
}
99+
100+
public async Task InsertColumnsHandler()
101+
{
102+
// Insert 2 columns to the right of column index 2
103+
await SpreadsheetInstance.InsertColumnAsync(2, 2);
104+
105+
// Insert 3 columns to the left of column index 5
106+
await SpreadsheetInstance.InsertColumnAsync(5, 3, null, ColumnPosition.Left);
107+
108+
// Insert 1 column to the right of column B in Sheet2
109+
await SpreadsheetInstance.InsertColumnAsync(1, 1, "Sheet2", ColumnPosition.Right);
110+
111+
// Insert 4 columns to the left of column D in the sheet at index 3
112+
await SpreadsheetInstance.InsertColumnAsync(3, 4, 3, ColumnPosition.Left);
113+
}
114+
}
115+
116+
{% endhighlight %}
117+
{% endtabs %}
118+
119+
## Setting Row and Column Count
120+
121+
The Blazor Spreadsheet component enables you to define the initial number of rows and columns using the [`RowCount`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_RowCount) and [`ColumnCount`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_ColumnCount) properties.
122+
123+
* The default `RowCount` is **1000**.
124+
* The default `ColumnCount` is **200**.
125+
126+
### Rendering Behavior
127+
128+
- **Without Data Source:**
129+
130+
- When no data is bound to the spreadsheet, the sheet renders empty cells up to the specified row and column counts.
131+
132+
- **With Data Source (e.g., byte array or imported file):**
133+
134+
- If the data source contains fewer rows and columns than the specified row and column counts, the spreadsheet renders additional empty rows and columns to meet those counts.
135+
- If the data source contains more rows and columns than the specified row and column counts, the spreadsheet renders enough rows and columns to display all the data (i.e., it extends beyond those counts to fit the data). Your data is never truncated by these properties.
136+
137+
138+
You can set these properties as follows:
139+
140+
{% tabs %}
141+
{% highlight razor tabtitle="Index.razor" %}
142+
143+
@using Syncfusion.Blazor.Spreadsheet
144+
145+
<SfSpreadsheet DataSource="DataSourceBytes" RowCount="1200" ColumnCount="300" >
146+
<SpreadsheetRibbon></SpreadsheetRibbon>
147+
</SfSpreadsheet>
148+
149+
@code {
150+
public byte[] DataSourceBytes { get; set; }
151+
152+
protected override void OnInitialized()
153+
{
154+
string filePath = "wwwroot/Sample.xlsx";
155+
DataSourceBytes = File.ReadAllBytes(filePath);
156+
}
157+
}
158+
159+
{% endhighlight %}
160+
{% endtabs %}

0 commit comments

Comments
 (0)