Build 2.9.0.57 of xlsgen adds a
Group by capability to xlsgen. Rows of data can be consolidated into groups and visually represented as such.
Here is an example, before and after :
An example of Group by, a new capability of xlsgenAnd here is how to set it up :
define a style for the "background" rows
xlsgen::IXlsStylePtr styleGray = wksht001->NewStyle();
styleGray->Font->Color = 0x888888;
define the range where the group by will apply
xlsgen::IXlsRangePtr r1 = wksht001->NewRange(L"C4:E20");
group by (1st column is used as sorting clue)
xlsgen::IXlsConditionalFormattingPtr cf1 = r1->NewConditionalFormatting();
cf1->Style = styleGray;
cf1->PredefinedCondition->GroupBy(1);
Since this Group by is actually a predefined conditional formatting (a two-part conditional formatting to be accurate), it is dynamically updated as the underlying data changes. And it is also rendered in print/preview/PDF.