library/Garp/Content/Import/Excel.php
protected function _getReader() {
        /**
         * Note: this is now autoloaded by Composer
         */
        //require APPLICATION_PATH.'/../garp/library/Garp/3rdParty/PHPExcel/Classes/PHPExcel.php';

        $inputFileType = PHPExcel_IOFactory::identify($this->_importFile);
        // HTML is never correct. Just default to Excel2007
        // @todo Fix this. It should be able to determine the filetype correctly.
        if ($inputFileType === 'HTML') {
            $inputFileType = 'Excel2007';
        }
        $reader = PHPExcel_IOFactory::createReader($inputFileType);
        // we are only interested in cell values (not formatting etc.), so set readDataOnly to true
        // $reader->setReadDataOnly(true);
        $phpexcel = $reader->load($this->_importFile);

        return $phpexcel;
    }
protected function _getReader() {
        /**
         * Note: this is now autoloaded by Composer
         */
        //require APPLICATION_PATH.'/../garp/library/Garp/3rdParty/PHPExcel/Classes/PHPExcel.php';

        $inputFileType = PHPExcel_IOFactory::identify($this->_importFile);
        // HTML is never correct. Just default to Excel2007
        // @todo Fix this. It should be able to determine the filetype correctly.
        if ($inputFileType === 'HTML') {
            $inputFileType = 'Excel2007';
        }
        $reader = PHPExcel_IOFactory::createReader($inputFileType);
        // we are only interested in cell values (not formatting etc.), so set readDataOnly to true
        // $reader->setReadDataOnly(true);
        $phpexcel = $reader->load($this->_importFile);

        return $phpexcel;
    }
protected function _getReader ( ) { /**
         * Note: this is now autoloaded by Composer
         */ //require APPLICATION_PATH.'/../garp/library/Garp/3rdParty/PHPExcel/Classes/PHPExcel.php'; $ inputFileType = PHPExcel_IOFactory :: identify ( $ this -> _importFile ) ; // HTML is never correct. Just default to Excel2007 // @todo Fix this. It should be able to determine the filetype correctly. if ( $ inputFileType === 'HTML' ) { $ inputFileType = 'Excel2007' ; } $ reader = PHPExcel_IOFactory :: createReader ( $ inputFileType ) ; // we are only interested in cell values (not formatting etc.), so set readDataOnly to true // $reader->setReadDataOnly(true); $ phpexcel = $ reader -> load ( $ this -> _importFile ) ; return $ phpexcel ; }
Return an Excel reader
@return PHPExcel
Return an Excel reader