'Append a group footer to the XLS data
@param rows: the XLS rows array to append to
@param group: the group dict
@param level: the grouping level'

def xls_group_footer(self, rows, group, level=0):

    columns = self.data.get('c')
    totals = group.get('t')
    if self.group_headers:
        value = self.totals_label
    else:
        v = group.get('v')
        value = ('%s    %s' % (s3_unicode(s3_strip_markup(v)), self.totals_label))
    row = {}
    footer = {}
    span = 0
    has_totals = False
    if (not totals):
        if self.group_headers:
            return
        label = value
    elif columns:
        label = None
        for column in columns:
            has_value = (column in totals)
            if (label is None):
                if (not has_value):
                    span += 1
                    continue
                else:
                    label = value
            has_totals = True
            row[column] = (totals[column] if has_value else '')
    row['_group'] = {'label': label, 'span': span, 'totals': has_totals}
    row['_style'] = 'subtotals'
    rows.append(row)
