PHPExcel is a PHP library to handle both read/write from/to an excel file. Below is a short tutorial to cover reading data from an excel file.
$filename = 'your_file.xls'; require_once 'PHPExcel/Classes/PHPExcel.php'; // Create new PHPExcel object $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objPHPExcel = $objReader->load($filename); foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { $sheet_name = $worksheet->getTitle(); foreach ($worksheet->getRowIterator() as $row) { $cellIterator = $row->getCellIterator(); $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if empty foreach ($cellIterator as $cell) { if (!is_null($cell)) { $cell_coord = $cell->getCoordinate(); $cell_val = $cell->getCalculatedValue(); if (preg_match('/^([a-zA-Z]+)([0-9]+)$/', $cell_coord, $matches)){ $col = $matches[1]; $row = (int) $matches[2]; do_something_with_this_cell($sheet_name, $col, $row, $cell_val); } } } } } For do_something_with_this_cell($sheet_name, $col, $row, $cell_val), you can either store the value into DB for later analysis, or look up a mapping array and determine what that cell carries.
...