Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- App::import('Vendor', 'PHPExcel', array('file' => 'PHPExcel.php'));
- $excelFile = DAY_DIR."/data.xlsx";
- $objReader = PHPExcel_IOFactory::createReader('Excel2007');
- $objPHPExcel = $objReader->load($excelFile);
- //Itrating through all the sheets in the excel workbook and storing the array data
- foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
- $arrayData[$worksheet->getTitle()] = $worksheet->toArray();
- }
- pr($arrayData);
Add Comment
Please, Sign In to add comment