Skip to content

Instantly share code, notes, and snippets.

View rapliandras's full-sized avatar

Rápli András rapliandras

View GitHub Profile
$inputFileName = "xxxxxx.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());
}