Guest User

Untitled

a guest
Mar 24th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. App::import('Vendor', 'PHPExcel', array('file' => 'PHPExcel.php'));
  2. $excelFile = DAY_DIR."/data.xlsx";
  3.  
  4. $objReader = PHPExcel_IOFactory::createReader('Excel2007');
  5. $objPHPExcel = $objReader->load($excelFile);
  6.  
  7. //Itrating through all the sheets in the excel workbook and storing the array data
  8. foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
  9. $arrayData[$worksheet->getTitle()] = $worksheet->toArray();
  10. }
  11.  
  12. pr($arrayData);
Add Comment
Please, Sign In to add comment