You are here

public function PHPExcel_Reader_Excel2007::_getFromZipArchive in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php \PHPExcel_Reader_Excel2007::_getFromZipArchive()
5 calls to PHPExcel_Reader_Excel2007::_getFromZipArchive()
PHPExcel_Reader_Excel2007::canRead in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php
* Can the current PHPExcel_Reader_IReader read the file? * *
PHPExcel_Reader_Excel2007::listWorksheetInfo in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php
* Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) * *
PHPExcel_Reader_Excel2007::listWorksheetNames in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php
* Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object * *
PHPExcel_Reader_Excel2007::load in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php
* Loads PHPExcel from file * *
PHPExcel_Reader_Excel2007::_readRibbon in vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php, line 317

Class

PHPExcel_Reader_Excel2007
PHPExcel_Reader_Excel2007

Code

public function _getFromZipArchive($archive, $fileName = '') {

  // Root-relative paths
  if (strpos($fileName, '//') !== false) {
    $fileName = substr($fileName, strpos($fileName, '//') + 1);
  }
  $fileName = PHPExcel_Shared_File::realpath($fileName);

  // Apache POI fixes
  $contents = $archive
    ->getFromName($fileName);
  if ($contents === false) {
    $contents = $archive
      ->getFromName(substr($fileName, 1));
  }
  return $contents;
}