ms excel file doesn't load in PHPExcel but when i create excelsheets using libreoffice in linux it's load and upload in database.
$temp=$_FILES['file']['tmp_name'];
$destination = "/var/www/html/recovery";
move_uploaded_file($temp,$destination."/"."recovery"."."."xlsx");
chmod("/var/www/html/recovery/recovery.xlsx", 0777);
$inputFileName ='recovery.xlsx';
try
{
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel =$objReader->load($inputFileName);
}
catch(Exception $e)
{
die('Error loading file "'.pathinfo($inputFileName,PATHINFO_BASENAME).'": '.$e->getMessage());
}
$allDataInSheet = $objPHPExcel->getActiveSheet()- >toArray(null,true,true,true);
$arrayCount = count($allDataInSheet);
what i do for upload all type of excel file in database using PHPExcel.