(self)
return [[self.export_sheet_name, table]]
Exports the report as excel.

        When rendering a complex cell, it will assign a value in the following order:
        1. cell['raw']
        2. cell['sort_key']
        3. str(cell)
Exports the report as excel.
Exports the report as excel .
def export_table(self):
        """
        Exports the report as excel.

        When rendering a complex cell, it will assign a value in the following order:
        1. cell['raw']
        2. cell['sort_key']
        3. str(cell)
        """
        headers = self.headers
        def _unformat_row(row):
            def _unformat_val(val):
                if isinstance(val, dict):
                    return val.get('raw', val.get('sort_key', val))
                return self._strip_tags(val)

            return [_unformat_val(val) for val in row]

        table = headers.as_export_table
        self.exporting_as_excel = True
        rows = (_unformat_row(row) for row in self.export_rows)
        table = chain(table, rows)
        if self.total_row:
            table = chain(table, [_unformat_row(self.total_row)])
        if self.statistics_rows:
            table = chain(table, [_unformat_row(row) for row in self.statistics_rows])

        return [[self.export_sheet_name, table]]
def export_table ( self ) : headers = self . headers def _unformat_row ( row ) : def _unformat_val ( val ) : if isinstance ( val , dict ) : return val . get ( 'raw' , val . get ( 'sort_key' , val ) ) return self . _strip_tags ( val ) return [ _unformat_val ( val ) for val in row ] table = headers . as_export_table self . exporting_as_excel = True rows = ( _unformat_row ( row ) for row in self . export_rows ) table = chain ( table , rows ) if self . total_row : table = chain ( table , [ _unformat_row ( self . total_row ) ] ) if self . statistics_rows : table = chain ( table , [ _unformat_row ( row ) for row in self . statistics_rows ] ) return [ [ self . export_sheet_name , table ] ]