Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • CholeskyDecomposition
  • Dao
  • DateTime
  • DateTimeZone
  • DOMNode
  • EigenvalueDecomposition
  • Elemento
  • Historial
  • Irradiacion
  • Latitud
  • MotorPhp
  • Panel
  • PclZip
  • Periodo
  • PHPExcel
  • PHPExcel_Autoloader
  • PHPExcel_Best_Fit
  • PHPExcel_CachedObjectStorage_APC
  • PHPExcel_CachedObjectStorage_CacheBase
  • PHPExcel_CachedObjectStorage_DiscISAM
  • PHPExcel_CachedObjectStorage_Igbinary
  • PHPExcel_CachedObjectStorage_Memcache
  • PHPExcel_CachedObjectStorage_Memory
  • PHPExcel_CachedObjectStorage_MemoryGZip
  • PHPExcel_CachedObjectStorage_MemorySerialized
  • PHPExcel_CachedObjectStorage_PHPTemp
  • PHPExcel_CachedObjectStorage_SQLite
  • PHPExcel_CachedObjectStorage_SQLite3
  • PHPExcel_CachedObjectStorage_Wincache
  • PHPExcel_CachedObjectStorageFactory
  • PHPExcel_CalcEngine_CyclicReferenceStack
  • PHPExcel_CalcEngine_Logger
  • PHPExcel_Calculation
  • PHPExcel_Calculation_Database
  • PHPExcel_Calculation_DateTime
  • PHPExcel_Calculation_Engineering
  • PHPExcel_Calculation_ExceptionHandler
  • PHPExcel_Calculation_Financial
  • PHPExcel_Calculation_FormulaParser
  • PHPExcel_Calculation_FormulaToken
  • PHPExcel_Calculation_Function
  • PHPExcel_Calculation_Functions
  • PHPExcel_Calculation_Logical
  • PHPExcel_Calculation_LookupRef
  • PHPExcel_Calculation_MathTrig
  • PHPExcel_Calculation_Statistical
  • PHPExcel_Calculation_TextData
  • PHPExcel_Calculation_Token_Stack
  • PHPExcel_Cell
  • PHPExcel_Cell_AdvancedValueBinder
  • PHPExcel_Cell_DataType
  • PHPExcel_Cell_DataValidation
  • PHPExcel_Cell_DefaultValueBinder
  • PHPExcel_Cell_Hyperlink
  • PHPExcel_Chart
  • PHPExcel_Chart_DataSeries
  • PHPExcel_Chart_DataSeriesValues
  • PHPExcel_Chart_Layout
  • PHPExcel_Chart_Legend
  • PHPExcel_Chart_PlotArea
  • PHPExcel_Chart_Renderer_jpgraph
  • PHPExcel_Chart_Title
  • PHPExcel_Comment
  • PHPExcel_DocumentProperties
  • PHPExcel_DocumentSecurity
  • PHPExcel_Exponential_Best_Fit
  • PHPExcel_HashTable
  • PHPExcel_IOFactory
  • PHPExcel_Linear_Best_Fit
  • PHPExcel_Logarithmic_Best_Fit
  • PHPExcel_NamedRange
  • PHPExcel_Polynomial_Best_Fit
  • PHPExcel_Power_Best_Fit
  • PHPExcel_Reader_Abstract
  • PHPExcel_Reader_CSV
  • PHPExcel_Reader_DefaultReadFilter
  • PHPExcel_Reader_Excel2003XML
  • PHPExcel_Reader_Excel2007
  • PHPExcel_Reader_Excel2007_Chart
  • PHPExcel_Reader_Excel2007_Theme
  • PHPExcel_Reader_Excel5
  • PHPExcel_Reader_Excel5_Escher
  • PHPExcel_Reader_Excel5_MD5
  • PHPExcel_Reader_Excel5_RC4
  • PHPExcel_Reader_Gnumeric
  • PHPExcel_Reader_HTML
  • PHPExcel_Reader_OOCalc
  • PHPExcel_Reader_SYLK
  • PHPExcel_ReferenceHelper
  • PHPExcel_RichText
  • PHPExcel_RichText_Run
  • PHPExcel_RichText_TextElement
  • PHPExcel_Settings
  • PHPExcel_Shared_CodePage
  • PHPExcel_Shared_Date
  • PHPExcel_Shared_Drawing
  • PHPExcel_Shared_Escher
  • PHPExcel_Shared_Escher_DgContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer
  • PHPExcel_Shared_Escher_DggContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip
  • PHPExcel_Shared_Excel5
  • PHPExcel_Shared_File
  • PHPExcel_Shared_Font
  • PHPExcel_Shared_JAMA_LUDecomposition
  • PHPExcel_Shared_JAMA_Matrix
  • PHPExcel_Shared_JAMA_QRDecomposition
  • PHPExcel_Shared_OLE
  • PHPExcel_Shared_OLE_ChainedBlockStream
  • PHPExcel_Shared_OLE_PPS
  • PHPExcel_Shared_OLE_PPS_File
  • PHPExcel_Shared_OLE_PPS_Root
  • PHPExcel_Shared_OLERead
  • PHPExcel_Shared_PasswordHasher
  • PHPExcel_Shared_String
  • PHPExcel_Shared_TimeZone
  • PHPExcel_Shared_XMLWriter
  • PHPExcel_Shared_ZipArchive
  • PHPExcel_Shared_ZipStreamWrapper
  • PHPExcel_Style
  • PHPExcel_Style_Alignment
  • PHPExcel_Style_Border
  • PHPExcel_Style_Borders
  • PHPExcel_Style_Color
  • PHPExcel_Style_Conditional
  • PHPExcel_Style_Fill
  • PHPExcel_Style_Font
  • PHPExcel_Style_NumberFormat
  • PHPExcel_Style_Protection
  • PHPExcel_Style_Supervisor
  • PHPExcel_Worksheet
  • PHPExcel_Worksheet_AutoFilter
  • PHPExcel_Worksheet_AutoFilter_Column
  • PHPExcel_Worksheet_AutoFilter_Column_Rule
  • PHPExcel_Worksheet_BaseDrawing
  • PHPExcel_Worksheet_CellIterator
  • PHPExcel_Worksheet_ColumnDimension
  • PHPExcel_Worksheet_Drawing
  • PHPExcel_Worksheet_Drawing_Shadow
  • PHPExcel_Worksheet_HeaderFooter
  • PHPExcel_Worksheet_HeaderFooterDrawing
  • PHPExcel_Worksheet_MemoryDrawing
  • PHPExcel_Worksheet_PageMargins
  • PHPExcel_Worksheet_PageSetup
  • PHPExcel_Worksheet_Protection
  • PHPExcel_Worksheet_Row
  • PHPExcel_Worksheet_RowDimension
  • PHPExcel_Worksheet_RowIterator
  • PHPExcel_Worksheet_SheetView
  • PHPExcel_WorksheetIterator
  • PHPExcel_Writer_Abstract
  • PHPExcel_Writer_CSV
  • PHPExcel_Writer_Excel2007
  • PHPExcel_Writer_Excel2007_Chart
  • PHPExcel_Writer_Excel2007_Comments
  • PHPExcel_Writer_Excel2007_ContentTypes
  • PHPExcel_Writer_Excel2007_DocProps
  • PHPExcel_Writer_Excel2007_Drawing
  • PHPExcel_Writer_Excel2007_Rels
  • PHPExcel_Writer_Excel2007_RelsRibbon
  • PHPExcel_Writer_Excel2007_RelsVBA
  • PHPExcel_Writer_Excel2007_StringTable
  • PHPExcel_Writer_Excel2007_Style
  • PHPExcel_Writer_Excel2007_Theme
  • PHPExcel_Writer_Excel2007_Workbook
  • PHPExcel_Writer_Excel2007_Worksheet
  • PHPExcel_Writer_Excel2007_WriterPart
  • PHPExcel_Writer_Excel5
  • PHPExcel_Writer_Excel5_BIFFwriter
  • PHPExcel_Writer_Excel5_Escher
  • PHPExcel_Writer_Excel5_Font
  • PHPExcel_Writer_Excel5_Parser
  • PHPExcel_Writer_Excel5_Workbook
  • PHPExcel_Writer_Excel5_Worksheet
  • PHPExcel_Writer_Excel5_Xf
  • PHPExcel_Writer_HTML
  • PHPExcel_Writer_PDF
  • PHPExcel_Writer_PDF_Core
  • PHPExcel_Writer_PDF_DomPDF
  • PHPExcel_Writer_PDF_mPDF
  • PHPExcel_Writer_PDF_tcPDF
  • Provincia
  • Radiacion
  • SingularValueDecomposition
  • Sistema
  • trendClass
  • xajax
  • xajaxArgumentManager
  • xajaxCallableObject
  • xajaxCallableObjectPlugin
  • xajaxControl
  • xajaxControlContainer
  • xajaxCustomRequest
  • xajaxCustomResponse
  • xajaxEvent
  • xajaxEventPlugin
  • xajaxFunctionPlugin
  • xajaxIncludeClientScriptPlugin
  • xajaxLanguageManager
  • xajaxPlugin
  • xajaxPluginManager
  • xajaxRequest
  • xajaxRequestPlugin
  • xajaxResponse
  • xajaxResponseManager
  • xajaxResponsePlugin
  • xajaxScriptPlugin
  • xajaxUserFunction
  • XMLWriter

Interfaces

  • DateTimeInterface
  • Iterator
  • PHPExcel_CachedObjectStorage_ICache
  • PHPExcel_Cell_IValueBinder
  • PHPExcel_IComparable
  • PHPExcel_Reader_IReader
  • PHPExcel_Reader_IReadFilter
  • PHPExcel_RichText_ITextElement
  • PHPExcel_Writer_IWriter
  • Throwable
  • Traversable

Exceptions

  • Exception
  • PHPExcel_Calculation_Exception
  • PHPExcel_Chart_Exception
  • PHPExcel_Exception
  • PHPExcel_Reader_Exception
  • PHPExcel_Writer_Exception

Functions

  • acosh
  • agregar_elemento
  • asinh
  • atanh
  • borrar_elementos
  • borrar_gdm_ab
  • borrar_irradiacion
  • borrar_latitud
  • borrar_panel
  • borrar_periodo
  • borrar_pmp_min_pmp_max
  • borrar_radiacion
  • borrar_resumen
  • borrar_sistema
  • borrar_sombra
  • gdm_ab
  • grabar_resumen
  • historial
  • hypo
  • irradiacion
  • JAMAError
  • latitud
  • limpiar_historial
  • login
  • mb_str_replace
  • mostrar_energia_total_ch
  • mostrar_panel_md_th
  • mostrar_panel_th
  • mostrar_radiacion_md_th
  • mostrar_radiacion_th
  • mostrar_resumen_th
  • panel
  • PclZipUtilCopyBlock
  • PclZipUtilOptionText
  • PclZipUtilPathInclusion
  • PclZipUtilPathReduction
  • PclZipUtilRename
  • PclZipUtilTranslateWinPath
  • periodo
  • pmp_min_pmp_max
  • preparar_panel
  • preparar_radiacion
  • preparar_radiacion_media
  • radiacion
  • resumen
  • sistema
  • sombra
  • xajaxCompressFile
  • xajaxErrorHandler
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: /**
  3:  * PHPExcel
  4:  *
  5:  * Copyright (c) 2006 - 2014 PHPExcel
  6:  *
  7:  * This library is free software; you can redistribute it and/or
  8:  * modify it under the terms of the GNU Lesser General Public
  9:  * License as published by the Free Software Foundation; either
 10:  * version 2.1 of the License, or (at your option) any later version.
 11:  *
 12:  * This library is distributed in the hope that it will be useful,
 13:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15:  * Lesser General Public License for more details.
 16:  *
 17:  * You should have received a copy of the GNU Lesser General Public
 18:  * License along with this library; if not, write to the Free Software
 19:  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 20:  *
 21:  * @category   PHPExcel
 22:  * @package    PHPExcel
 23:  * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
 24:  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
 25:  * @version    1.8.0, 2014-03-02
 26:  */
 27: 
 28: 
 29: /** PHPExcel root directory */
 30: if (!defined('PHPEXCEL_ROOT')) {
 31:     /**
 32:      * @ignore
 33:      */
 34:     define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
 35:     require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
 36: }
 37: 
 38: /**
 39:  * PHPExcel_IOFactory
 40:  *
 41:  * @category   PHPExcel
 42:  * @package    PHPExcel
 43:  * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
 44:  */
 45: class PHPExcel_IOFactory
 46: {
 47:     /**
 48:      * Search locations
 49:      *
 50:      * @var array
 51:      * @access  private
 52:      * @static
 53:      */
 54:     private static $_searchLocations = array(
 55:         array( 'type' => 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => 'PHPExcel_Writer_{0}' ),
 56:         array( 'type' => 'IReader', 'path' => 'PHPExcel/Reader/{0}.php', 'class' => 'PHPExcel_Reader_{0}' )
 57:     );
 58: 
 59:     /**
 60:      * Autoresolve classes
 61:      *
 62:      * @var array
 63:      * @access  private
 64:      * @static
 65:      */
 66:     private static $_autoResolveClasses = array(
 67:         'Excel2007',
 68:         'Excel5',
 69:         'Excel2003XML',
 70:         'OOCalc',
 71:         'SYLK',
 72:         'Gnumeric',
 73:         'HTML',
 74:         'CSV',
 75:     );
 76: 
 77:     /**
 78:      *  Private constructor for PHPExcel_IOFactory
 79:      */
 80:     private function __construct() { }
 81: 
 82:     /**
 83:      * Get search locations
 84:      *
 85:      * @static
 86:      * @access  public
 87:      * @return  array
 88:      */
 89:     public static function getSearchLocations() {
 90:         return self::$_searchLocations;
 91:     }   //  function getSearchLocations()
 92: 
 93:     /**
 94:      * Set search locations
 95:      *
 96:      * @static
 97:      * @access  public
 98:      * @param   array $value
 99:      * @throws  PHPExcel_Reader_Exception
100:      */
101:     public static function setSearchLocations($value) {
102:         if (is_array($value)) {
103:             self::$_searchLocations = $value;
104:         } else {
105:             throw new PHPExcel_Reader_Exception('Invalid parameter passed.');
106:         }
107:     }   //  function setSearchLocations()
108: 
109:     /**
110:      * Add search location
111:      *
112:      * @static
113:      * @access  public
114:      * @param   string $type        Example: IWriter
115:      * @param   string $location    Example: PHPExcel/Writer/{0}.php
116:      * @param   string $classname   Example: PHPExcel_Writer_{0}
117:      */
118:     public static function addSearchLocation($type = '', $location = '', $classname = '') {
119:         self::$_searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname );
120:     }   //  function addSearchLocation()
121: 
122:     /**
123:      * Create PHPExcel_Writer_IWriter
124:      *
125:      * @static
126:      * @access  public
127:      * @param   PHPExcel $phpExcel
128:      * @param   string  $writerType Example: Excel2007
129:      * @return  PHPExcel_Writer_IWriter
130:      * @throws  PHPExcel_Reader_Exception
131:      */
132:     public static function createWriter(PHPExcel $phpExcel, $writerType = '') {
133:         // Search type
134:         $searchType = 'IWriter';
135: 
136:         // Include class
137:         foreach (self::$_searchLocations as $searchLocation) {
138:             if ($searchLocation['type'] == $searchType) {
139:                 $className = str_replace('{0}', $writerType, $searchLocation['class']);
140: 
141:                 $instance = new $className($phpExcel);
142:                 if ($instance !== NULL) {
143:                     return $instance;
144:                 }
145:             }
146:         }
147: 
148:         // Nothing found...
149:         throw new PHPExcel_Reader_Exception("No $searchType found for type $writerType");
150:     }   //  function createWriter()
151: 
152:     /**
153:      * Create PHPExcel_Reader_IReader
154:      *
155:      * @static
156:      * @access  public
157:      * @param   string $readerType  Example: Excel2007
158:      * @return  PHPExcel_Reader_IReader
159:      * @throws  PHPExcel_Reader_Exception
160:      */
161:     public static function createReader($readerType = '') {
162:         // Search type
163:         $searchType = 'IReader';
164: 
165:         // Include class
166:         foreach (self::$_searchLocations as $searchLocation) {
167:             if ($searchLocation['type'] == $searchType) {
168:                 $className = str_replace('{0}', $readerType, $searchLocation['class']);
169: 
170:                 $instance = new $className();
171:                 if ($instance !== NULL) {
172:                     return $instance;
173:                 }
174:             }
175:         }
176: 
177:         // Nothing found...
178:         throw new PHPExcel_Reader_Exception("No $searchType found for type $readerType");
179:     }   //  function createReader()
180: 
181:     /**
182:      * Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution
183:      *
184:      * @static
185:      * @access public
186:      * @param   string      $pFilename      The name of the spreadsheet file
187:      * @return  PHPExcel
188:      * @throws  PHPExcel_Reader_Exception
189:      */
190:     public static function load($pFilename) {
191:         $reader = self::createReaderForFile($pFilename);
192:         return $reader->load($pFilename);
193:     }   //  function load()
194: 
195:     /**
196:      * Identify file type using automatic PHPExcel_Reader_IReader resolution
197:      *
198:      * @static
199:      * @access public
200:      * @param   string      $pFilename      The name of the spreadsheet file to identify
201:      * @return  string
202:      * @throws  PHPExcel_Reader_Exception
203:      */
204:     public static function identify($pFilename) {
205:         $reader = self::createReaderForFile($pFilename);
206:         $className = get_class($reader);
207:         $classType = explode('_',$className);
208:         unset($reader);
209:         return array_pop($classType);
210:     }   //  function identify()
211: 
212:     /**
213:      * Create PHPExcel_Reader_IReader for file using automatic PHPExcel_Reader_IReader resolution
214:      *
215:      * @static
216:      * @access  public
217:      * @param   string      $pFilename      The name of the spreadsheet file
218:      * @return  PHPExcel_Reader_IReader
219:      * @throws  PHPExcel_Reader_Exception
220:      */
221:     public static function createReaderForFile($pFilename) {
222: 
223:         // First, lucky guess by inspecting file extension
224:         $pathinfo = pathinfo($pFilename);
225: 
226:         $extensionType = NULL;
227:         if (isset($pathinfo['extension'])) {
228:             switch (strtolower($pathinfo['extension'])) {
229:                 case 'xlsx':            //  Excel (OfficeOpenXML) Spreadsheet
230:                 case 'xlsm':            //  Excel (OfficeOpenXML) Macro Spreadsheet (macros will be discarded)
231:                 case 'xltx':            //  Excel (OfficeOpenXML) Template
232:                 case 'xltm':            //  Excel (OfficeOpenXML) Macro Template (macros will be discarded)
233:                     $extensionType = 'Excel2007';
234:                     break;
235:                 case 'xls':             //  Excel (BIFF) Spreadsheet
236:                 case 'xlt':             //  Excel (BIFF) Template
237:                     $extensionType = 'Excel5';
238:                     break;
239:                 case 'ods':             //  Open/Libre Offic Calc
240:                 case 'ots':             //  Open/Libre Offic Calc Template
241:                     $extensionType = 'OOCalc';
242:                     break;
243:                 case 'slk':
244:                     $extensionType = 'SYLK';
245:                     break;
246:                 case 'xml':             //  Excel 2003 SpreadSheetML
247:                     $extensionType = 'Excel2003XML';
248:                     break;
249:                 case 'gnumeric':
250:                     $extensionType = 'Gnumeric';
251:                     break;
252:                 case 'htm':
253:                 case 'html':
254:                     $extensionType = 'HTML';
255:                     break;
256:                 case 'csv':
257:                     // Do nothing
258:                     // We must not try to use CSV reader since it loads
259:                     // all files including Excel files etc.
260:                     break;
261:                 default:
262:                     break;
263:             }
264: 
265:             if ($extensionType !== NULL) {
266:                 $reader = self::createReader($extensionType);
267:                 // Let's see if we are lucky
268:                 if (isset($reader) && $reader->canRead($pFilename)) {
269:                     return $reader;
270:                 }
271:             }
272:         }
273: 
274:         // If we reach here then "lucky guess" didn't give any result
275:         // Try walking through all the options in self::$_autoResolveClasses
276:         foreach (self::$_autoResolveClasses as $autoResolveClass) {
277:             //  Ignore our original guess, we know that won't work
278:             if ($autoResolveClass !== $extensionType) {
279:                 $reader = self::createReader($autoResolveClass);
280:                 if ($reader->canRead($pFilename)) {
281:                     return $reader;
282:                 }
283:             }
284:         }
285: 
286:         throw new PHPExcel_Reader_Exception('Unable to identify a reader for this file');
287:     }   //  function createReaderForFile()
288: }
289: 
Autene API documentation generated by ApiGen