Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
370
Document.Excel: how to control outlining after Export of data
posted

Hello,

using Infragistics 2016.1's Documents.Excel Reference, I managed to export data from a datatable to a new Excel file and to create outlining.

Here's a code snippet:

qryGroupHeadersOfCurrentPackage.ForEach
                                (r =>
                                {
                                    var StartRow = r.RowNumberWithinPackageName;
                                    var EndRow = r.RowNumberWithinPackageName + r.DescendantsCount-1;
                                    for (var x = StartRow; x <= EndRow; x++)
                                    {
                                        xlWksPackageTree.Rows[x].OutlineLevel += 1;
                                    }
                                }
                                );

This works well and fast. :)

But is there a way to make sure that Excel's group headers (the "+" row headers) are above the Details? In Excel's VBA, I'd ensure that this way:

'still unclear ow to do this (Excel Automation) in Infragistics Excel document:
xlWksPackageTree.Outline.AutomaticStyles = false
xlWksPackageTree.Outline.SummaryRow = XlSummaryRow.xlSummaryAbove
xlWksPackageTree.Outline.SummaryColumn = XlSummaryColumn.xlSummaryOnLeft

Thanks for any hint.

Regards

Martin

Parents
No Data
Reply
  • 1560
    Offline posted
    Hello,
    I have been looking into your question, however, I will need some clarifications regarding the way you would like the excel table to look like.  Can you please share a small sample application that demonstrates the issue?
    It doesn't have to be your production application - just attach the simplest sample that duplicates the issue or image how you require to look the excel table.
    It will be very helpful in order to find the best suggestion in this case.
    Thank you for your cooperation.
    Looking forward to hearing from you.
    Sincerely,
    Teodosia Hristodorova
    Associate Software Developer
Children