I want to do grouping in Excel with C#. Please refer attached my excel screen shot.
I was trying to achieve this using sheet range but sheet rows are dynamic so cant use sheet.Range().
Also tried with AutoOutline() Function.
Please suggest any solution on this
Thanks in Advance
There is no built-in way to apply grouping in the desired manner. However, you can manually iterate through all rows, analyze content in "grouping" cells, and add group rows manually. Since your document has a multi-level tree, you need to iterate through all groups recursively.
Attached is an example that demonstrates this approach in action. Please test it and let me know whether it helps.