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 Reply Children
No Data