Reading specific row or column - phpExcel Reading specific row or column - phpExcel codeigniter codeigniter

Reading specific row or column - phpExcel


There are plenty of methods:

$cellValue = $objPHPExcel->getActiveSheet()->getCell('C15')->getValue();

will read the value of a specific cell (C15 in this case) into the variable $cellValue

or

$cellValues = $objPHPExcel->getActiveSheet()->rangeToArray('C15:C18');

will read a range of values to an array.

Once you've retrieved the contents of a cell to a normal PHP variable, it's easy enough to insert them into a database as you'd insert any data avalues into a database.