We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Grouping dataset values with Header Repeat


I am new with Aspose so please bear with me :-).
I have a requirement. I am trying to display a datatable in the excel report.
I need to group data based on AccountID. This I am able to do, and also I am skipping one line between each group. But problem is I need to show one common header row for each group. Please guide me for how to do that.

Thanks in advance.


Thanks for providing us some details.

How do you group data based on AccountID and skip one line between each group. We think you may implement the task by using Smart Markers feature. Use Smart Markers’s Grouping Data feature, see the document (especially the description/example under “Grouping Data” sub-topic ):

Hope, this helps a bit.

Hi @Amjad_Sahi,

Thanks for the reply.
But my query was not regarding grouping the data. As I mentioned above that I already know, and I have used above link to get that details.
My query was after grouping, for each group I need to apply one common header row.
So same header row will repeat above each group of data. So is there any way to implement that.

Thanks in advance.



I think for your custom needs, you have to insert the header row manually (after grouping data) by Aspose.Cells APIs, I do not see any automatic way to cope with it. Anyways, could you provide some sample files to demonstrate your custom needs so we could evaluate it if there is any better way to do it. Please provide the following artifacts and resource files for better evaluation of your requirements/issue:

  1. Your current output file (by Aspose.Cells APIs).
  2. Your desired file (having header rows repeated for each group), you may create the desired file manually in MS Excel.
  3. Your template file or input file (if any).
  4. Sample console application (runnable), you should use dynamic datasets/datatable in code if you are using Smart Markers feature without any inter-dependencies, so we could execute it with any issue.