Free Support Forum - aspose.com

Group by header and sum at the top

Hi,


We have a urgent requirement in our reports where the group by header and sum needs to be at the top instead of bottom.

I have tried but not able to achieve the desired result using smart tags. Please tell me how we can achieve this ?

I am attaching a sample for your reference.


Thanks

Hi,


Well, I am afraid, we do not support rendering summary rows on top instead of the bottom while using Grouping data feature (for Group by clause) in Smart markers, see the topic for your complete reference:
http://www.aspose.com/docs/display/cellsnet/Smart+Markers
(Note: Please see the description and examples under “Grouping Data” sub headings in the topic)

By the way, we have MS Excel’s feature i.e. Subtotal where you may try to set “false” for “summaryRowData” boolean last parameter of Cells.Subtotal() method overload (second overloaded method), see the topic for general reference on Subtotals and how it works:
http://www.aspose.com/docs/display/cellsnet/Creating+Subtotals
Here your data should be sorted properly and pasted on the sheet cells accordingly, so this would be a bit manual approach.

Also, for your requirement, I am afraid, if you use Smart Markers Grouping data feature, then after processing the smart markers, you have to manually do the insertion( find out the summary rows and copying them into the specified locations after inserting blank rows, etc.) using the API provided by Aspose.Cells as there is no automatic way to do it either in MS Excel or in Aspose.Cells.

Thanks for your understanding!

Hi,

Thanks for your reply. Would you be able to send some sample ?

Hi,


We request you to kindly see the following documents for your reference, you may refer to the topics and write your own code adopting any approach based on your specific data accordingly:
http://www.aspose.com/docs/display/cellsnet/Smart+Markers
(Note: Please see the description and examples under “Grouping Data” sub headings in the topic)

http://www.aspose.com/docs/display/cellsnet/Creating+Subtotals
MS Excel has a feature i.e. Subtotal where you may try to set “false” for “summaryRowData” boolean last parameter of Cells.Subtotal() method overload (second overloaded method). Here your data should be sorted properly and pasted on the sheet cells accordingly.

Thank you.