I am using phpexcel library to read an excel file.It works perfeclty on 99%. But sometimes it reads empty columns also.My code is
try {
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
} catch(Exception $e) {
die('Error loading file');
}
$worksheet=$objPHPExcel->getActiveSheet();) {
$worksheetTitle = $worksheet->getTitle();
$highestRow = $worksheet->getHighestRow();
$highestColumn = $worksheet->getHighestColumn();
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
$nrColumns = ord($highestColumn) - 64;
sometimes the $highestcolumn returns 'WVL' even if the data in excel column up to 'C' why?. Also i want to check all the rows under a particular column is empty or not,Is there any easy method to do it instead of iterating all rows using for loop.