How to customize extracted excel

How to customize extracted excel

  
Hi everyone,

i have one table having two columns Name and color.
i want to extract report like below
i successfully extracted Name and Color column (in green block)
How to add total rows at the end of the excel(in red block).


I am using below code: (it will create excel same like table structure)


Please help me on that
Hi Pranav gandhe,

you have to do your SQL Query with "group by Color" then you can export how you are doing.

hope I could help you.

Regards







Rather than adding it to the same workbook, I'd use AdvancedExcel from forge and create a second workbook.
thanks, Gonçalo Azambujo,
that i understand we can use group by but
My question is, how can i create data like above, because im passing table.list directly to excel.
i need two type of data one is table and other one is count.


Hi, 

you can "group by color" then "count" the "Name" column in the aggregate, then will be created another "temporary" column that indicates the total count of each grouped color.
You can export the color column and the "temporary" column that  counts the colors.

Regards