We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeGrid Aggregate columns not Exported to Excel

Hello,

I am trying to export TreeGrid to Excel. Everything works except the Aggregates are not exported correctly.

All I see in Excel is "Sum:0" for the Aggregate at the bottom.

Please review the attached screenshot of excel and my code for building the TreeGrid.

===============================

<SfTreeGrid @ref="TreeGrid" DataSource="@TreeData" IdMapping="Id" ParentIdMapping="ParentId" TreeColumnIndex="0" RowHeight="20"

                                Toolbar="@(new List<string>() { "ExcelExport" })" AllowExcelExport="true" Height="600px" >

                                <TreeGridEvents QueryCellInfo="QueryCellInfoHandler" OnToolbarClick="ToolbarClickHandler" TValue="Instrument"></TreeGridEvents>

                                <TreeGridAggregates>

                                    <TreeGridAggregate ShowChildSummary="false">

                                        <TreeGridAggregateColumns>

                                            <TreeGridAggregateColumn Field="ICE" Type="Syncfusion.Blazor.Grids.AggregateType.Sum">

                                                <FooterTemplate>

                                                    @{

                                                        var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);

                                                        <div>

                                                            <p>@sumvalue.Sum</p>

                                                        </div>

                                                    }

                                                </FooterTemplate>

                                            </TreeGridAggregateColumn>

                                            <TreeGridAggregateColumn Field="Bloomberg" Type="Syncfusion.Blazor.Grids.AggregateType.Sum">

                                                <FooterTemplate>

                                                    @{

                                                        var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);

                                                        <div>

                                                            <p>@sumvalue.Sum</p>

                                                        </div>

                                                    }

                                                </FooterTemplate>

                                            </TreeGridAggregateColumn>

                                            <TreeGridAggregateColumn Field="PricingDirect" Type="Syncfusion.Blazor.Grids.AggregateType.Sum">

                                                <FooterTemplate>

                                                    @{

                                                        var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);

                                                        <div>

                                                            <p>@sumvalue.Sum</p>

                                                        </div>

                                                    }

                                                </FooterTemplate>

                                            </TreeGridAggregateColumn>

                                            <TreeGridAggregateColumn Field="Refinitiv" Type="Syncfusion.Blazor.Grids.AggregateType.Sum">

                                                <FooterTemplate>

                                                    @{

                                                        var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);

                                                        <div>

                                                            <p>@sumvalue.Sum</p>

                                                        </div>

                                                    }

                                                </FooterTemplate>

                                            </TreeGridAggregateColumn>

                                            <TreeGridAggregateColumn Field="Markit" Type="Syncfusion.Blazor.Grids.AggregateType.Sum">

                                                <FooterTemplate>

                                                    @{

                                                        var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);

                                                        <div>

                                                            <p>@sumvalue.Sum</p>

                                                        </div>

                                                    }

                                                </FooterTemplate>

                                            </TreeGridAggregateColumn>

                                            <TreeGridAggregateColumn Field="AB" Type="Syncfusion.Blazor.Grids.AggregateType.Sum">

                                                <FooterTemplate>

                                                    @{

                                                        var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);

                                                        <div>

                                                            <p>@sumvalue.Sum</p>

                                                        </div>

                                                    }

                                                </FooterTemplate>

                                            </TreeGridAggregateColumn>

                                            <TreeGridAggregateColumn Field="Total" Type="Syncfusion.Blazor.Grids.AggregateType.Sum">

                                                <FooterTemplate>

                                                    @{

                                                        var sumvalue = (context as Syncfusion.Blazor.Grids.AggregateTemplateContext);

                                                        <div>

                                                            <p>@sumvalue.Sum</p>

                                                        </div>

                                                    }

                                                </FooterTemplate>

                                            </TreeGridAggregateColumn>

                                        </TreeGridAggregateColumns>

                                    </TreeGridAggregate>

                                </TreeGridAggregates>

                                <TreeGridColumns>

                                    <TreeGridColumn Field="CoreDisplay" HeaderText="Core Display" Width="100" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Left"></TreeGridColumn>

                                    <TreeGridColumn Field="ICE" HeaderText="ICE" Width="50" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></TreeGridColumn>

                                    <TreeGridColumn Field="Bloomberg" HeaderText="Bloomberg" Width="50" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></TreeGridColumn>

                                    <TreeGridColumn Field="PricingDirect" HeaderText="PricingDirect" Width="50" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></TreeGridColumn>

                                    <TreeGridColumn Field="Refinitiv" HeaderText="Refinitiv" Width="50" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></TreeGridColumn>

                                    <TreeGridColumn Field="Markit" HeaderText="Markit" Width="50" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></TreeGridColumn>

                                    <TreeGridColumn Field="AB" HeaderText="AB" Width="50" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></TreeGridColumn>

                                    <TreeGridColumn Field="Total" HeaderText="Total" Width="50" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></TreeGridColumn>

                                </TreeGridColumns>

                            </SfTreeGrid>

=============================





Thank you,

Yoshiro



Attachment: treegrid_c0fb5a44.zip


2 Replies

PS Pon Selva Jeganathan Syncfusion Team November 23, 2022 02:11 PM UTC

Hi Yoshira,


Query: Everything works except the Aggregates are not exported correctly


We are able to replicate the issue at our end. On further validation, we have considered the reported issue (The aggregate column value is not properly exported.”) as a bug. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and will include the fix in our upcoming patch release which is expected to be rolled out on first weekly patch release after the volume 4 release(at the end of December). Until then we appreciate your patience.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 

https://www.syncfusion.com/feedback/39328/the-aggregate-column-value-is-not-exported-properly


Note: To view the above feedback, kindly login into your account. 


Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Regards, 

Pon selva 



PS Pon Selva Jeganathan Syncfusion Team January 5, 2023 03:40 PM UTC

Yoshira,


We are glad to announce that fix for the issue The aggregate column value is not properly exported” has been rolled out in our patch release. We request you to update to our latest version " 20.4.42" to resolve the issue. 


Kindly get back to us for further assistance.


Loader.
Live Chat Icon For mobile
Up arrow icon