You are here

public function PHPExcel_Reader_Abstract::canRead in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Abstract.php \PHPExcel_Reader_Abstract::canRead()

* Can the current PHPExcel_Reader_IReader read the file? * *

Parameters

string $pFilename: * @return boolean * @throws PHPExcel_Reader_Exception

Overrides PHPExcel_Reader_IReader::canRead

5 methods override PHPExcel_Reader_Abstract::canRead()
PHPExcel_Reader_Excel2003XML::canRead in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2003XML.php
* Can the current PHPExcel_Reader_IReader read the file? * *
PHPExcel_Reader_Excel2007::canRead in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php
* Can the current PHPExcel_Reader_IReader read the file? * *
PHPExcel_Reader_Excel5::canRead in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php
* Can the current PHPExcel_Reader_IReader read the file? * *
PHPExcel_Reader_Gnumeric::canRead in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php
* Can the current PHPExcel_Reader_IReader read the file? * *
PHPExcel_Reader_OOCalc::canRead in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/OOCalc.php
* Can the current PHPExcel_Reader_IReader read the file? * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Abstract.php, line 216

Class

PHPExcel_Reader_Abstract
PHPExcel_Reader_Abstract

Code

public function canRead($pFilename) {

  // Check if file exists
  try {
    $this
      ->_openFile($pFilename);
  } catch (Exception $e) {
    return FALSE;
  }
  $readable = $this
    ->_isValidFormat();
  fclose($this->_fileHandle);
  return $readable;
}