private static function getExcel(array $data)
    {
        $excel = new \PHPExcel();
        $row = 1;
        $col = 0;
        $sheet = $excel->getActiveSheet();
        foreach ($data as $d) {
            if (is_array($d)) {
                foreach ($d as $dd) {
                    $sheet->getCellByColumnAndRow($col, $row)->setValue((string)$dd);
                    $col++;
                }
                $col = 0;
            } else {
                $sheet->getCellByColumnAndRow($col, $row)->setValue((string)$d);
            }
            $row++;
        }
        return $excel;
    }