Grid/Export/Export.php
protected function getFlatGridData($grid)
    {
        $data = $this->getGridData($grid);

        $flatData = [];
        if (isset($data['titles'])) {
            $flatData[] = $data['titles'];
        }

        return array_merge($flatData, $data['rows']);
    }
protected function getFlatGridData($grid)
    {
        $data = $this->getGridData($grid);

        $flatData = [];
        if (isset($data['titles'])) {
            $flatData[] = $data['titles'];
        }

        return array_merge($flatData, $data['rows']);
    }
Get data form the grid in a flat array.

@param Grid $grid

@return array

array(
'0' => array(
'column_id_1' => 'column_title_1',
'column_id_2' => 'column_title_2'
),
'1' => array(
'column_id_1' => 'cell_value_1_1',
'column_id_2' => 'cell_value_1_2'
),
'2' => array(
'column_id_1' => 'cell_value_2_1',
'column_id_2' => 'cell_value_2_2'
)
)