Ejemplo n.º 1
0
 /**
  * parce xls
  */
 public function importXLS(Request $request)
 {
     if ($file = $request->file('xls')) {
         if (array_keys(['application/vnd.ms-office', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], $file->getMimeType())) {
             $this->url = $file->move('xls/' . file::_get_path(), $file->getClientOriginalName());
             $this->data = Excel_::_loadXls($this->url);
             return view('admin.excel.viewDataFromXls', ['data' => $this->data]);
         } else {
             return view('admin.excel.import')->with(['error' => 'No type file']);
         }
     } else {
         return view('admin.excel.import');
     }
 }
Ejemplo n.º 2
0
 public function downloadXLS($xml_file)
 {
     $this->_parce('xml/' . file::_get_path() . '/' . $xml_file);
     $excel = new Excel_($this->data->getContent());
     $excel->_getMockup();
 }