Skip to content

Commit 4cd0981

Browse files
committed
new KB - group flat data in Excel file
1 parent 3f9d914 commit 4cd0981

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

knowledge-base/grouping-data-using-radspreadprocessing.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ res_type: kb
1010
ticketid: 1692310
1111
---
1212

13+
<style>
14+
img[alt$="><"] {
15+
border: 1px solid lightgrey;
16+
}
17+
</style>
18+
1319
## Environment
1420

1521
| Version | Product | Author |
@@ -18,16 +24,24 @@ ticketid: 1692310
1824

1925
## Description
2026

21-
This article shows how to generate a worksheet with grouped data having a flat collection of records as an input.
27+
This article shows how to generate a worksheet with **grouped** data having a **flat** collection of records as an input.
28+
29+
>caption Flat vs. Grouped Data
30+
31+
![Flat vs Grouped Data in Excel ><](images/build-grouped-data-in-spreadprocessing.png)
2232

2333
## Solution
2434

35+
Note that if you want to perform grouping, this data operation should be performed separately and then populate the Worksheet with the grouped rows.
36+
37+
Once you have the grouped data, then, the SpreadProcessing functionality (in a similar way like MS Excel) allows you to assign the outline level to all rows that belong to the same group. To make it clearer, let's have the following example: a flat list of products stored in CSV data for simplicity.
38+
2539
To group data in a worksheet, follow these steps:
2640

2741
### Preparing Grouped Data
2842

29-
1. Perform grouping on your flat data before populating the worksheet.
30-
2. Use LINQ or other methods to group rows based on a specific column.
43+
1. Perform grouping on your flat data (e.g. Northwind.Products) before populating the worksheet.
44+
2. Use LINQ or other methods to group rows based on a specific column (e.g. CategoryID).
3145

3246
Use the following code snippet to group rows in a worksheet:
3347

@@ -163,12 +177,8 @@ Use the following code snippet to group rows in a worksheet:
163177
}
164178
```
165179

166-
167-
168180
Modify the example to suit your specific data structure and requirements.
169181

170182
## See Also
171183

172-
- [RadSpreadStreamProcessing Overview](https://docs.telerik.com/devtools/document-processing/libraries/radspreadstreamprocessing/overview)
173-
- [RadSpreadStreamProcessing API Reference](https://docs.telerik.com/devtools/document-processing/api/telerik.windows.documents.spreadsheet.model)
174-
- [Document Processing Libraries Overview](https://docs.telerik.com/devtools/document-processing/introduction)
184+
- [Grouping in SpreadProcessing]({%slug radspreadprocessing-features-grouping%})
408 KB
Loading

libraries/radspreadprocessing/features/grouping.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,5 @@ Both properties have a default value of true. The following snippet shows how to
189189

190190
* [Filtering]({%slug radspreadprocessing-features-filtering%})
191191
* [Sorting]({%slug radspreadprocessing-features-sorting%})
192+
* [Grouping Data Example Using RadSpreadProcessing]({%slug grouping-data-using-radspreadprocessing%})
192193

0 commit comments

Comments
 (0)