├── .gitattributes ├── LICENSE ├── PHPExcel.php ├── PHPExcel ├── Autoloader.php ├── CachedObjectStorage │ ├── APC.php │ ├── CacheBase.php │ ├── DiscISAM.php │ ├── ICache.php │ ├── Igbinary.php │ ├── Memcache.php │ ├── Memory.php │ ├── MemoryGZip.php │ ├── MemorySerialized.php │ ├── PHPTemp.php │ ├── SQLite.php │ ├── SQLite3.php │ └── Wincache.php ├── CachedObjectStorageFactory.php ├── CalcEngine │ ├── CyclicReferenceStack.php │ └── Logger.php ├── Calculation.php ├── Calculation │ ├── Database.php │ ├── DateTime.php │ ├── Engineering.php │ ├── Exception.php │ ├── ExceptionHandler.php │ ├── Financial.php │ ├── FormulaParser.php │ ├── FormulaToken.php │ ├── Function.php │ ├── Functions.php │ ├── Logical.php │ ├── LookupRef.php │ ├── MathTrig.php │ ├── Statistical.php │ ├── TextData.php │ ├── Token │ │ └── Stack.php │ └── functionlist.txt ├── Cell.php ├── Cell │ ├── AdvancedValueBinder.php │ ├── DataType.php │ ├── DataValidation.php │ ├── DefaultValueBinder.php │ ├── Hyperlink.php │ └── IValueBinder.php ├── Chart.php ├── Chart │ ├── Axis.php │ ├── DataSeries.php │ ├── DataSeriesValues.php │ ├── Exception.php │ ├── GridLines.php │ ├── Layout.php │ ├── Legend.php │ ├── PlotArea.php │ ├── Properties.php │ ├── Renderer │ │ ├── PHP Charting Libraries.txt │ │ └── jpgraph.php │ └── Title.php ├── Comment.php ├── DocumentProperties.php ├── DocumentSecurity.php ├── Exception.php ├── HashTable.php ├── Helper │ └── HTML.php ├── IComparable.php ├── IOFactory.php ├── NamedRange.php ├── Reader │ ├── Abstract.php │ ├── CSV.php │ ├── DefaultReadFilter.php │ ├── Excel2003XML.php │ ├── Excel2007.php │ ├── Excel2007 │ │ ├── Chart.php │ │ └── Theme.php │ ├── Excel5.php │ ├── Excel5 │ │ ├── Color.php │ │ ├── Color │ │ │ ├── BIFF5.php │ │ │ ├── BIFF8.php │ │ │ └── BuiltIn.php │ │ ├── ErrorCode.php │ │ ├── Escher.php │ │ ├── MD5.php │ │ ├── RC4.php │ │ └── Style │ │ │ ├── Border.php │ │ │ └── FillPattern.php │ ├── Exception.php │ ├── Gnumeric.php │ ├── HTML.php │ ├── IReadFilter.php │ ├── IReader.php │ ├── OOCalc.php │ └── SYLK.php ├── ReferenceHelper.php ├── RichText.php ├── RichText │ ├── ITextElement.php │ ├── Run.php │ └── TextElement.php ├── Settings.php ├── Shared │ ├── CodePage.php │ ├── Date.php │ ├── Drawing.php │ ├── Escher.php │ ├── Escher │ │ ├── DgContainer.php │ │ ├── DgContainer │ │ │ ├── SpgrContainer.php │ │ │ └── SpgrContainer │ │ │ │ └── SpContainer.php │ │ ├── DggContainer.php │ │ └── DggContainer │ │ │ ├── BstoreContainer.php │ │ │ └── BstoreContainer │ │ │ ├── BSE.php │ │ │ └── BSE │ │ │ └── Blip.php │ ├── Excel5.php │ ├── File.php │ ├── Font.php │ ├── JAMA │ │ ├── CHANGELOG.TXT │ │ ├── CholeskyDecomposition.php │ │ ├── EigenvalueDecomposition.php │ │ ├── LUDecomposition.php │ │ ├── Matrix.php │ │ ├── QRDecomposition.php │ │ ├── SingularValueDecomposition.php │ │ └── utils │ │ │ ├── Error.php │ │ │ └── Maths.php │ ├── OLE.php │ ├── OLE │ │ ├── ChainedBlockStream.php │ │ ├── PPS.php │ │ └── PPS │ │ │ ├── File.php │ │ │ └── Root.php │ ├── OLERead.php │ ├── PCLZip │ │ ├── gnu-lgpl.txt │ │ ├── pclzip.lib.php │ │ └── readme.txt │ ├── PasswordHasher.php │ ├── String.php │ ├── TimeZone.php │ ├── XMLWriter.php │ ├── ZipArchive.php │ ├── ZipStreamWrapper.php │ └── trend │ │ ├── bestFitClass.php │ │ ├── exponentialBestFitClass.php │ │ ├── linearBestFitClass.php │ │ ├── logarithmicBestFitClass.php │ │ ├── polynomialBestFitClass.php │ │ ├── powerBestFitClass.php │ │ └── trendClass.php ├── Style.php ├── Style │ ├── Alignment.php │ ├── Border.php │ ├── Borders.php │ ├── Color.php │ ├── Conditional.php │ ├── Fill.php │ ├── Font.php │ ├── NumberFormat.php │ ├── Protection.php │ └── Supervisor.php ├── Worksheet.php ├── Worksheet │ ├── AutoFilter.php │ ├── AutoFilter │ │ ├── Column.php │ │ └── Column │ │ │ └── Rule.php │ ├── BaseDrawing.php │ ├── CellIterator.php │ ├── Column.php │ ├── ColumnCellIterator.php │ ├── ColumnDimension.php │ ├── ColumnIterator.php │ ├── Dimension.php │ ├── Drawing.php │ ├── Drawing │ │ └── Shadow.php │ ├── HeaderFooter.php │ ├── HeaderFooterDrawing.php │ ├── MemoryDrawing.php │ ├── PageMargins.php │ ├── PageSetup.php │ ├── Protection.php │ ├── Row.php │ ├── RowCellIterator.php │ ├── RowDimension.php │ ├── RowIterator.php │ └── SheetView.php ├── WorksheetIterator.php ├── Writer │ ├── Abstract.php │ ├── CSV.php │ ├── Excel2007.php │ ├── Excel2007 │ │ ├── Chart.php │ │ ├── Comments.php │ │ ├── ContentTypes.php │ │ ├── DocProps.php │ │ ├── Drawing.php │ │ ├── Rels.php │ │ ├── RelsRibbon.php │ │ ├── RelsVBA.php │ │ ├── StringTable.php │ │ ├── Style.php │ │ ├── Theme.php │ │ ├── Workbook.php │ │ ├── Worksheet.php │ │ └── WriterPart.php │ ├── Excel5.php │ ├── Excel5 │ │ ├── BIFFwriter.php │ │ ├── Escher.php │ │ ├── Font.php │ │ ├── Parser.php │ │ ├── Workbook.php │ │ ├── Worksheet.php │ │ └── Xf.php │ ├── Exception.php │ ├── HTML.php │ ├── IWriter.php │ ├── OpenDocument.php │ ├── OpenDocument │ │ ├── Cell │ │ │ └── Comment.php │ │ ├── Content.php │ │ ├── Meta.php │ │ ├── MetaInf.php │ │ ├── Mimetype.php │ │ ├── Settings.php │ │ ├── Styles.php │ │ ├── Thumbnails.php │ │ └── WriterPart.php │ ├── PDF.php │ └── PDF │ │ ├── Core.php │ │ ├── DomPDF.php │ │ ├── mPDF.php │ │ └── tcPDF.php └── locale │ ├── bg │ └── config │ ├── cs │ ├── config │ └── functions │ ├── da │ ├── config │ └── functions │ ├── de │ ├── config │ └── functions │ ├── en │ └── uk │ │ └── config │ ├── es │ ├── config │ └── functions │ ├── fi │ ├── config │ └── functions │ ├── fr │ ├── config │ └── functions │ ├── hu │ ├── config │ └── functions │ ├── it │ ├── config │ └── functions │ ├── nl │ ├── config │ └── functions │ ├── no │ ├── config │ └── functions │ ├── pl │ ├── config │ └── functions │ ├── pt │ ├── br │ │ ├── config │ │ └── functions │ ├── config │ └── functions │ ├── ru │ ├── config │ └── functions │ ├── sv │ ├── config │ └── functions │ └── tr │ ├── config │ └── functions ├── export.php ├── img └── excel.png ├── index.php ├── samplesheet.xls └── sql.sql /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /PHPExcel/Autoloader.php: -------------------------------------------------------------------------------- 1 | = 0) { 52 | return spl_autoload_register(array('PHPExcel_Autoloader', 'load'), true, true); 53 | } else { 54 | return spl_autoload_register(array('PHPExcel_Autoloader', 'load')); 55 | } 56 | } 57 | 58 | /** 59 | * Autoload a class identified by name 60 | * 61 | * @param string $pClassName Name of the object to load 62 | */ 63 | public static function load($pClassName) 64 | { 65 | if ((class_exists($pClassName, false)) || (strpos($pClassName, 'PHPExcel') !== 0)) { 66 | // Either already loaded, or not a PHPExcel class request 67 | return false; 68 | } 69 | 70 | $pClassFilePath = PHPEXCEL_ROOT . 71 | str_replace('_', DIRECTORY_SEPARATOR, $pClassName) . 72 | '.php'; 73 | 74 | if ((file_exists($pClassFilePath) === false) || (is_readable($pClassFilePath) === false)) { 75 | // Can't load 76 | return false; 77 | } 78 | 79 | require($pClassFilePath); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /PHPExcel/CachedObjectStorage/ICache.php: -------------------------------------------------------------------------------- 1 | cellCache[$pCoord] = $cell; 50 | 51 | // Set current entry to the new/updated entry 52 | $this->currentObjectID = $pCoord; 53 | 54 | return $cell; 55 | } 56 | 57 | 58 | /** 59 | * Get cell at a specific coordinate 60 | * 61 | * @param string $pCoord Coordinate of the cell 62 | * @throws PHPExcel_Exception 63 | * @return PHPExcel_Cell Cell that was found, or null if not found 64 | */ 65 | public function getCacheData($pCoord) 66 | { 67 | // Check if the entry that has been requested actually exists 68 | if (!isset($this->cellCache[$pCoord])) { 69 | $this->currentObjectID = null; 70 | // Return null if requested entry doesn't exist in cache 71 | return null; 72 | } 73 | 74 | // Set current entry to the requested entry 75 | $this->currentObjectID = $pCoord; 76 | 77 | // Return requested entry 78 | return $this->cellCache[$pCoord]; 79 | } 80 | 81 | 82 | /** 83 | * Clone the cell collection 84 | * 85 | * @param PHPExcel_Worksheet $parent The new worksheet 86 | */ 87 | public function copyCellCollection(PHPExcel_Worksheet $parent) 88 | { 89 | parent::copyCellCollection($parent); 90 | 91 | $newCollection = array(); 92 | foreach ($this->cellCache as $k => &$cell) { 93 | $newCollection[$k] = clone $cell; 94 | $newCollection[$k]->attach($this); 95 | } 96 | 97 | $this->cellCache = $newCollection; 98 | } 99 | 100 | /** 101 | * Clear the cell collection and disconnect from our parent 102 | * 103 | */ 104 | public function unsetWorksheetCells() 105 | { 106 | // Because cells are all stored as intact objects in memory, we need to detach each one from the parent 107 | foreach ($this->cellCache as $k => &$cell) { 108 | $cell->detach(); 109 | $this->cellCache[$k] = null; 110 | } 111 | unset($cell); 112 | 113 | $this->cellCache = array(); 114 | 115 | // detach ourself from the worksheet, so that it can then delete this object successfully 116 | $this->parent = null; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /PHPExcel/CalcEngine/CyclicReferenceStack.php: -------------------------------------------------------------------------------- 1 | stack); 45 | } 46 | 47 | /** 48 | * Push a new entry onto the stack 49 | * 50 | * @param mixed $value 51 | */ 52 | public function push($value) 53 | { 54 | $this->stack[$value] = $value; 55 | } 56 | 57 | /** 58 | * Pop the last entry from the stack 59 | * 60 | * @return mixed 61 | */ 62 | public function pop() 63 | { 64 | return array_pop($this->stack); 65 | } 66 | 67 | /** 68 | * Test to see if a specified entry exists on the stack 69 | * 70 | * @param mixed $value The value to test 71 | */ 72 | public function onStack($value) 73 | { 74 | return isset($this->stack[$value]); 75 | } 76 | 77 | /** 78 | * Clear the stack 79 | */ 80 | public function clear() 81 | { 82 | $this->stack = array(); 83 | } 84 | 85 | /** 86 | * Return an array of all entries on the stack 87 | * 88 | * @return mixed[] 89 | */ 90 | public function showStack() 91 | { 92 | return $this->stack; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /PHPExcel/Calculation/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 43 | $e->file = $file; 44 | throw $e; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /PHPExcel/Calculation/ExceptionHandler.php: -------------------------------------------------------------------------------- 1 | count; 52 | } 53 | 54 | /** 55 | * Push a new entry onto the stack 56 | * 57 | * @param mixed $type 58 | * @param mixed $value 59 | * @param mixed $reference 60 | */ 61 | public function push($type, $value, $reference = null) 62 | { 63 | $this->stack[$this->count++] = array( 64 | 'type' => $type, 65 | 'value' => $value, 66 | 'reference' => $reference 67 | ); 68 | if ($type == 'Function') { 69 | $localeFunction = PHPExcel_Calculation::localeFunc($value); 70 | if ($localeFunction != $value) { 71 | $this->stack[($this->count - 1)]['localeValue'] = $localeFunction; 72 | } 73 | } 74 | } 75 | 76 | /** 77 | * Pop the last entry from the stack 78 | * 79 | * @return mixed 80 | */ 81 | public function pop() 82 | { 83 | if ($this->count > 0) { 84 | return $this->stack[--$this->count]; 85 | } 86 | return null; 87 | } 88 | 89 | /** 90 | * Return an entry from the stack without removing it 91 | * 92 | * @param integer $n number indicating how far back in the stack we want to look 93 | * @return mixed 94 | */ 95 | public function last($n = 1) 96 | { 97 | if ($this->count - $n < 0) { 98 | return null; 99 | } 100 | return $this->stack[$this->count - $n]; 101 | } 102 | 103 | /** 104 | * Clear the stack 105 | */ 106 | public function clear() 107 | { 108 | $this->stack = array(); 109 | $this->count = 0; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /PHPExcel/Calculation/functionlist.txt: -------------------------------------------------------------------------------- 1 | ABS 2 | ACCRINT 3 | ACCRINTM 4 | ACOS 5 | ACOSH 6 | ADDRESS 7 | AMORDEGRC 8 | AMORLINC 9 | AND 10 | AREAS 11 | ASC 12 | ASIN 13 | ASINH 14 | ATAN 15 | ATAN2 16 | ATANH 17 | AVEDEV 18 | AVERAGE 19 | AVERAGEA 20 | AVERAGEIF 21 | AVERAGEIFS 22 | BAHTTEXT 23 | BESSELI 24 | BESSELJ 25 | BESSELK 26 | BESSELY 27 | BETADIST 28 | BETAINV 29 | BIN2DEC 30 | BIN2HEX 31 | BIN2OCT 32 | BINOMDIST 33 | CEILING 34 | CELL 35 | CHAR 36 | CHIDIST 37 | CHIINV 38 | CHITEST 39 | CHOOSE 40 | CLEAN 41 | CODE 42 | COLUMN 43 | COLUMNS 44 | COMBIN 45 | COMPLEX 46 | CONCATENATE 47 | CONFIDENCE 48 | CONVERT 49 | CORREL 50 | COS 51 | COSH 52 | COUNT 53 | COUNTA 54 | COUNTBLANK 55 | COUNTIF 56 | COUNTIFS 57 | COUPDAYBS 58 | COUPDAYBS 59 | COUPDAYSNC 60 | COUPNCD 61 | COUPNUM 62 | COUPPCD 63 | COVAR 64 | CRITBINOM 65 | CUBEKPIMEMBER 66 | CUBEMEMBER 67 | CUBEMEMBERPROPERTY 68 | CUBERANKEDMEMBER 69 | CUBESET 70 | CUBESETCOUNT 71 | CUBEVALUE 72 | CUMIPMT 73 | CUMPRINC 74 | DATE 75 | DATEDIF 76 | DATEVALUE 77 | DAVERAGE 78 | DAY 79 | DAYS360 80 | DB 81 | DCOUNT 82 | DCOUNTA 83 | DDB 84 | DEC2BIN 85 | DEC2HEX 86 | DEC2OCT 87 | DEGREES 88 | DELTA 89 | DEVSQ 90 | DGET 91 | DISC 92 | DMAX 93 | DMIN 94 | DOLLAR 95 | DOLLARDE 96 | DOLLARFR 97 | DPRODUCT 98 | DSTDEV 99 | DSTDEVP 100 | DSUM 101 | DURATION 102 | DVAR 103 | DVARP 104 | EDATE 105 | EFFECT 106 | EOMONTH 107 | ERF 108 | ERFC 109 | ERROR.TYPE 110 | EVEN 111 | EXACT 112 | EXP 113 | EXPONDIST 114 | FACT 115 | FACTDOUBLE 116 | FALSE 117 | FDIST 118 | FIND 119 | FINDB 120 | FINV 121 | FISHER 122 | FISHERINV 123 | FIXED 124 | FLOOR 125 | FORECAST 126 | FREQUENCY 127 | FTEST 128 | FV 129 | FVSCHEDULE 130 | GAMAMDIST 131 | GAMMAINV 132 | GAMMALN 133 | GCD 134 | GEOMEAN 135 | GESTEP 136 | GETPIVOTDATA 137 | GROWTH 138 | HARMEAN 139 | HEX2BIN 140 | HEX2OCT 141 | HLOOKUP 142 | HOUR 143 | HYPERLINK 144 | HYPGEOMDIST 145 | IF 146 | IFERROR 147 | IMABS 148 | IMAGINARY 149 | IMARGUMENT 150 | IMCONJUGATE 151 | IMCOS 152 | IMEXP 153 | IMLN 154 | IMLOG10 155 | IMLOG2 156 | IMPOWER 157 | IMPRODUCT 158 | IMREAL 159 | IMSIN 160 | IMSQRT 161 | IMSUB 162 | IMSUM 163 | INDEX 164 | INDIRECT 165 | INFO 166 | INT 167 | INTERCEPT 168 | INTRATE 169 | IPMT 170 | IRR 171 | ISBLANK 172 | ISERR 173 | ISERROR 174 | ISEVEN 175 | ISLOGICAL 176 | ISNA 177 | ISNONTEXT 178 | ISNUMBER 179 | ISODD 180 | ISPMT 181 | ISREF 182 | ISTEXT 183 | JIS 184 | KURT 185 | LARGE 186 | LCM 187 | LEFT 188 | LEFTB 189 | LEN 190 | LENB 191 | LINEST 192 | LN 193 | LOG 194 | LOG10 195 | LOGEST 196 | LOGINV 197 | LOGNORMDIST 198 | LOOKUP 199 | LOWER 200 | MATCH 201 | MAX 202 | MAXA 203 | MDETERM 204 | MDURATION 205 | MEDIAN 206 | MID 207 | MIDB 208 | MIN 209 | MINA 210 | MINUTE 211 | MINVERSE 212 | MIRR 213 | MMULT 214 | MOD 215 | MODE 216 | MONTH 217 | MROUND 218 | MULTINOMIAL 219 | N 220 | NA 221 | NEGBINOMDIST 222 | NETWORKDAYS 223 | NOMINAL 224 | NORMDIST 225 | NORMINV 226 | NORMSDIST 227 | NORMSINV 228 | NOT 229 | NOW 230 | NPER 231 | NPV 232 | OCT2BIN 233 | OCT2DEC 234 | OCT2HEX 235 | ODD 236 | ODDFPRICE 237 | ODDFYIELD 238 | ODDLPRICE 239 | ODDLYIELD 240 | OFFSET 241 | OR 242 | PEARSON 243 | PERCENTILE 244 | PERCENTRANK 245 | PERMUT 246 | PHONETIC 247 | PI 248 | PMT 249 | POISSON 250 | POWER 251 | PPMT 252 | PRICE 253 | PRICEDISC 254 | PRICEMAT 255 | PROB 256 | PRODUCT 257 | PROPER 258 | PV 259 | QUARTILE 260 | QUOTIENT 261 | RADIANS 262 | RAND 263 | RANDBETWEEN 264 | RANK 265 | RATE 266 | RECEIVED 267 | REPLACE 268 | REPLACEB 269 | REPT 270 | RIGHT 271 | RIGHTB 272 | ROMAN 273 | ROUND 274 | ROUNDDOWN 275 | ROUNDUP 276 | ROW 277 | ROWS 278 | RSQ 279 | RTD 280 | SEARCH 281 | SEARCHB 282 | SECOND 283 | SERIESSUM 284 | SIGN 285 | SIN 286 | SINH 287 | SKEW 288 | SLN 289 | SLOPE 290 | SMALL 291 | SQRT 292 | SQRTPI 293 | STANDARDIZE 294 | STDEV 295 | STDEVA 296 | STDEVP 297 | STDEVPA 298 | STEYX 299 | SUBSTITUTE 300 | SUBTOTAL 301 | SUM 302 | SUMIF 303 | SUMIFS 304 | SUMPRODUCT 305 | SUMSQ 306 | SUMX2MY2 307 | SUMX2PY2 308 | SUMXMY2 309 | SYD 310 | T 311 | TAN 312 | TANH 313 | TBILLEQ 314 | TBILLPRICE 315 | TBILLYIELD 316 | TDIST 317 | TEXT 318 | TIME 319 | TIMEVALUE 320 | TINV 321 | TODAY 322 | TRANSPOSE 323 | TREND 324 | TRIM 325 | TRIMMEAN 326 | TRUE 327 | TRUNC 328 | TTEST 329 | TYPE 330 | UPPER 331 | USDOLLAR 332 | VALUE 333 | VAR 334 | VARA 335 | VARP 336 | VARPA 337 | VDB 338 | VERSION 339 | VLOOKUP 340 | WEEKDAY 341 | WEEKNUM 342 | WEIBULL 343 | WORKDAY 344 | XIRR 345 | XNPV 346 | YEAR 347 | YEARFRAC 348 | YIELD 349 | YIELDDISC 350 | YIELDMAT 351 | ZTEST 352 | -------------------------------------------------------------------------------- /PHPExcel/Cell/DataType.php: -------------------------------------------------------------------------------- 1 | 0, 47 | '#DIV/0!' => 1, 48 | '#VALUE!' => 2, 49 | '#REF!' => 3, 50 | '#NAME?' => 4, 51 | '#NUM!' => 5, 52 | '#N/A' => 6 53 | ); 54 | 55 | /** 56 | * Get list of error codes 57 | * 58 | * @return array 59 | */ 60 | public static function getErrorCodes() 61 | { 62 | return self::$errorCodes; 63 | } 64 | 65 | /** 66 | * DataType for value 67 | * 68 | * @deprecated Replaced by PHPExcel_Cell_IValueBinder infrastructure, will be removed in version 1.8.0 69 | * @param mixed $pValue 70 | * @return string 71 | */ 72 | public static function dataTypeForValue($pValue = null) 73 | { 74 | return PHPExcel_Cell_DefaultValueBinder::dataTypeForValue($pValue); 75 | } 76 | 77 | /** 78 | * Check a string that it satisfies Excel requirements 79 | * 80 | * @param mixed Value to sanitize to an Excel string 81 | * @return mixed Sanitized value 82 | */ 83 | public static function checkString($pValue = null) 84 | { 85 | if ($pValue instanceof PHPExcel_RichText) { 86 | // TODO: Sanitize Rich-Text string (max. character count is 32,767) 87 | return $pValue; 88 | } 89 | 90 | // string must never be longer than 32,767 characters, truncate if necessary 91 | $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 32767); 92 | 93 | // we require that newline is represented as "\n" in core, not as "\r\n" or "\r" 94 | $pValue = str_replace(array("\r\n", "\r"), "\n", $pValue); 95 | 96 | return $pValue; 97 | } 98 | 99 | /** 100 | * Check a value that it is a valid error code 101 | * 102 | * @param mixed Value to sanitize to an Excel error code 103 | * @return string Sanitized value 104 | */ 105 | public static function checkErrorCode($pValue = null) 106 | { 107 | $pValue = (string) $pValue; 108 | 109 | if (!array_key_exists($pValue, self::$errorCodes)) { 110 | $pValue = '#NULL!'; 111 | } 112 | 113 | return $pValue; 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /PHPExcel/Cell/DefaultValueBinder.php: -------------------------------------------------------------------------------- 1 | format('Y-m-d H:i:s'); 55 | } elseif (!($value instanceof PHPExcel_RichText)) { 56 | $value = (string) $value; 57 | } 58 | } 59 | 60 | // Set value explicit 61 | $cell->setValueExplicit($value, self::dataTypeForValue($value)); 62 | 63 | // Done! 64 | return true; 65 | } 66 | 67 | /** 68 | * DataType for value 69 | * 70 | * @param mixed $pValue 71 | * @return string 72 | */ 73 | public static function dataTypeForValue($pValue = null) 74 | { 75 | // Match the value against a few data types 76 | if ($pValue === null) { 77 | return PHPExcel_Cell_DataType::TYPE_NULL; 78 | } elseif ($pValue === '') { 79 | return PHPExcel_Cell_DataType::TYPE_STRING; 80 | } elseif ($pValue instanceof PHPExcel_RichText) { 81 | return PHPExcel_Cell_DataType::TYPE_INLINE; 82 | } elseif ($pValue{0} === '=' && strlen($pValue) > 1) { 83 | return PHPExcel_Cell_DataType::TYPE_FORMULA; 84 | } elseif (is_bool($pValue)) { 85 | return PHPExcel_Cell_DataType::TYPE_BOOL; 86 | } elseif (is_float($pValue) || is_int($pValue)) { 87 | return PHPExcel_Cell_DataType::TYPE_NUMERIC; 88 | } elseif (preg_match('/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) { 89 | $tValue = ltrim($pValue, '+-'); 90 | if (is_string($pValue) && $tValue{0} === '0' && strlen($tValue) > 1 && $tValue{1} !== '.') { 91 | return PHPExcel_Cell_DataType::TYPE_STRING; 92 | } elseif ((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) { 93 | return PHPExcel_Cell_DataType::TYPE_STRING; 94 | } 95 | return PHPExcel_Cell_DataType::TYPE_NUMERIC; 96 | } elseif (is_string($pValue) && array_key_exists($pValue, PHPExcel_Cell_DataType::getErrorCodes())) { 97 | return PHPExcel_Cell_DataType::TYPE_ERROR; 98 | } 99 | 100 | return PHPExcel_Cell_DataType::TYPE_STRING; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /PHPExcel/Cell/Hyperlink.php: -------------------------------------------------------------------------------- 1 | url = $pUrl; 54 | $this->tooltip = $pTooltip; 55 | } 56 | 57 | /** 58 | * Get URL 59 | * 60 | * @return string 61 | */ 62 | public function getUrl() 63 | { 64 | return $this->url; 65 | } 66 | 67 | /** 68 | * Set URL 69 | * 70 | * @param string $value 71 | * @return PHPExcel_Cell_Hyperlink 72 | */ 73 | public function setUrl($value = '') 74 | { 75 | $this->url = $value; 76 | return $this; 77 | } 78 | 79 | /** 80 | * Get tooltip 81 | * 82 | * @return string 83 | */ 84 | public function getTooltip() 85 | { 86 | return $this->tooltip; 87 | } 88 | 89 | /** 90 | * Set tooltip 91 | * 92 | * @param string $value 93 | * @return PHPExcel_Cell_Hyperlink 94 | */ 95 | public function setTooltip($value = '') 96 | { 97 | $this->tooltip = $value; 98 | return $this; 99 | } 100 | 101 | /** 102 | * Is this hyperlink internal? (to another worksheet) 103 | * 104 | * @return boolean 105 | */ 106 | public function isInternal() 107 | { 108 | return strpos($this->url, 'sheet://') !== false; 109 | } 110 | 111 | /** 112 | * Get hash code 113 | * 114 | * @return string Hash code 115 | */ 116 | public function getHashCode() 117 | { 118 | return md5( 119 | $this->url . 120 | $this->tooltip . 121 | __CLASS__ 122 | ); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /PHPExcel/Cell/IValueBinder.php: -------------------------------------------------------------------------------- 1 | line = $line; 43 | $e->file = $file; 44 | throw $e; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /PHPExcel/Chart/PlotArea.php: -------------------------------------------------------------------------------- 1 | layout = $layout; 50 | $this->plotSeries = $plotSeries; 51 | } 52 | 53 | /** 54 | * Get Layout 55 | * 56 | * @return PHPExcel_Chart_Layout 57 | */ 58 | public function getLayout() 59 | { 60 | return $this->layout; 61 | } 62 | 63 | /** 64 | * Get Number of Plot Groups 65 | * 66 | * @return array of PHPExcel_Chart_DataSeries 67 | */ 68 | public function getPlotGroupCount() 69 | { 70 | return count($this->plotSeries); 71 | } 72 | 73 | /** 74 | * Get Number of Plot Series 75 | * 76 | * @return integer 77 | */ 78 | public function getPlotSeriesCount() 79 | { 80 | $seriesCount = 0; 81 | foreach ($this->plotSeries as $plot) { 82 | $seriesCount += $plot->getPlotSeriesCount(); 83 | } 84 | return $seriesCount; 85 | } 86 | 87 | /** 88 | * Get Plot Series 89 | * 90 | * @return array of PHPExcel_Chart_DataSeries 91 | */ 92 | public function getPlotGroup() 93 | { 94 | return $this->plotSeries; 95 | } 96 | 97 | /** 98 | * Get Plot Series by Index 99 | * 100 | * @return PHPExcel_Chart_DataSeries 101 | */ 102 | public function getPlotGroupByIndex($index) 103 | { 104 | return $this->plotSeries[$index]; 105 | } 106 | 107 | /** 108 | * Set Plot Series 109 | * 110 | * @param [PHPExcel_Chart_DataSeries] 111 | * @return PHPExcel_Chart_PlotArea 112 | */ 113 | public function setPlotSeries($plotSeries = array()) 114 | { 115 | $this->plotSeries = $plotSeries; 116 | 117 | return $this; 118 | } 119 | 120 | public function refresh(PHPExcel_Worksheet $worksheet) 121 | { 122 | foreach ($this->plotSeries as $plotSeries) { 123 | $plotSeries->refresh($worksheet); 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /PHPExcel/Chart/Renderer/PHP Charting Libraries.txt: -------------------------------------------------------------------------------- 1 | ChartDirector 2 | http://www.advsofteng.com/cdphp.html 3 | 4 | GraPHPite 5 | http://graphpite.sourceforge.net/ 6 | 7 | JpGraph 8 | http://www.aditus.nu/jpgraph/ 9 | 10 | LibChart 11 | http://naku.dohcrew.com/libchart/pages/introduction/ 12 | 13 | pChart 14 | http://pchart.sourceforge.net/ 15 | 16 | TeeChart 17 | http://www.steema.com/products/teechart/overview.html 18 | 19 | PHPGraphLib 20 | http://www.ebrueggeman.com/phpgraphlib -------------------------------------------------------------------------------- /PHPExcel/Chart/Title.php: -------------------------------------------------------------------------------- 1 | caption = $caption; 51 | $this->layout = $layout; 52 | } 53 | 54 | /** 55 | * Get caption 56 | * 57 | * @return string 58 | */ 59 | public function getCaption() 60 | { 61 | return $this->caption; 62 | } 63 | 64 | /** 65 | * Set caption 66 | * 67 | * @param string $caption 68 | * @return PHPExcel_Chart_Title 69 | */ 70 | public function setCaption($caption = null) 71 | { 72 | $this->caption = $caption; 73 | 74 | return $this; 75 | } 76 | 77 | /** 78 | * Get Layout 79 | * 80 | * @return PHPExcel_Chart_Layout 81 | */ 82 | public function getLayout() 83 | { 84 | return $this->layout; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /PHPExcel/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 51 | $e->file = $file; 52 | throw $e; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /PHPExcel/IComparable.php: -------------------------------------------------------------------------------- 1 | themeName = $themeName; 76 | $this->colourSchemeName = $colourSchemeName; 77 | $this->colourMap = $colourMap; 78 | } 79 | 80 | /** 81 | * Get Theme Name 82 | * 83 | * @return string 84 | */ 85 | public function getThemeName() 86 | { 87 | return $this->themeName; 88 | } 89 | 90 | /** 91 | * Get colour Scheme Name 92 | * 93 | * @return string 94 | */ 95 | public function getColourSchemeName() 96 | { 97 | return $this->colourSchemeName; 98 | } 99 | 100 | /** 101 | * Get colour Map Value by Position 102 | * 103 | * @return string 104 | */ 105 | public function getColourByIndex($index = 0) 106 | { 107 | if (isset($this->colourMap[$index])) { 108 | return $this->colourMap[$index]; 109 | } 110 | return null; 111 | } 112 | 113 | /** 114 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 115 | */ 116 | public function __clone() 117 | { 118 | $vars = get_object_vars($this); 119 | foreach ($vars as $key => $value) { 120 | if ((is_object($value)) && ($key != '_parent')) { 121 | $this->$key = clone $value; 122 | } else { 123 | $this->$key = $value; 124 | } 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/Color.php: -------------------------------------------------------------------------------- 1 | 'FF0000') 11 | */ 12 | public static function map($color, $palette, $version) 13 | { 14 | if ($color <= 0x07 || $color >= 0x40) { 15 | // special built-in color 16 | return PHPExcel_Reader_Excel5_Color_BuiltIn::lookup($color); 17 | } elseif (isset($palette) && isset($palette[$color - 8])) { 18 | // palette color, color index 0x08 maps to pallete index 0 19 | return $palette[$color - 8]; 20 | } else { 21 | // default color table 22 | if ($version == PHPExcel_Reader_Excel5::XLS_BIFF8) { 23 | return PHPExcel_Reader_Excel5_Color_BIFF8::lookup($color); 24 | } else { 25 | // BIFF5 26 | return PHPExcel_Reader_Excel5_Color_BIFF5::lookup($color); 27 | } 28 | } 29 | 30 | return $color; 31 | } 32 | } -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/Color/BIFF5.php: -------------------------------------------------------------------------------- 1 | '000000', 7 | 0x09 => 'FFFFFF', 8 | 0x0A => 'FF0000', 9 | 0x0B => '00FF00', 10 | 0x0C => '0000FF', 11 | 0x0D => 'FFFF00', 12 | 0x0E => 'FF00FF', 13 | 0x0F => '00FFFF', 14 | 0x10 => '800000', 15 | 0x11 => '008000', 16 | 0x12 => '000080', 17 | 0x13 => '808000', 18 | 0x14 => '800080', 19 | 0x15 => '008080', 20 | 0x16 => 'C0C0C0', 21 | 0x17 => '808080', 22 | 0x18 => '8080FF', 23 | 0x19 => '802060', 24 | 0x1A => 'FFFFC0', 25 | 0x1B => 'A0E0F0', 26 | 0x1C => '600080', 27 | 0x1D => 'FF8080', 28 | 0x1E => '0080C0', 29 | 0x1F => 'C0C0FF', 30 | 0x20 => '000080', 31 | 0x21 => 'FF00FF', 32 | 0x22 => 'FFFF00', 33 | 0x23 => '00FFFF', 34 | 0x24 => '800080', 35 | 0x25 => '800000', 36 | 0x26 => '008080', 37 | 0x27 => '0000FF', 38 | 0x28 => '00CFFF', 39 | 0x29 => '69FFFF', 40 | 0x2A => 'E0FFE0', 41 | 0x2B => 'FFFF80', 42 | 0x2C => 'A6CAF0', 43 | 0x2D => 'DD9CB3', 44 | 0x2E => 'B38FEE', 45 | 0x2F => 'E3E3E3', 46 | 0x30 => '2A6FF9', 47 | 0x31 => '3FB8CD', 48 | 0x32 => '488436', 49 | 0x33 => '958C41', 50 | 0x34 => '8E5E42', 51 | 0x35 => 'A0627A', 52 | 0x36 => '624FAC', 53 | 0x37 => '969696', 54 | 0x38 => '1D2FBE', 55 | 0x39 => '286676', 56 | 0x3A => '004500', 57 | 0x3B => '453E01', 58 | 0x3C => '6A2813', 59 | 0x3D => '85396A', 60 | 0x3E => '4A3285', 61 | 0x3F => '424242', 62 | ); 63 | 64 | /** 65 | * Map color array from BIFF5 built-in color index 66 | * 67 | * @param int $color 68 | * @return array 69 | */ 70 | public static function lookup($color) 71 | { 72 | if (isset(self::$map[$color])) { 73 | return array('rgb' => self::$map[$color]); 74 | } 75 | return array('rgb' => '000000'); 76 | } 77 | } -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/Color/BIFF8.php: -------------------------------------------------------------------------------- 1 | '000000', 7 | 0x09 => 'FFFFFF', 8 | 0x0A => 'FF0000', 9 | 0x0B => '00FF00', 10 | 0x0C => '0000FF', 11 | 0x0D => 'FFFF00', 12 | 0x0E => 'FF00FF', 13 | 0x0F => '00FFFF', 14 | 0x10 => '800000', 15 | 0x11 => '008000', 16 | 0x12 => '000080', 17 | 0x13 => '808000', 18 | 0x14 => '800080', 19 | 0x15 => '008080', 20 | 0x16 => 'C0C0C0', 21 | 0x17 => '808080', 22 | 0x18 => '9999FF', 23 | 0x19 => '993366', 24 | 0x1A => 'FFFFCC', 25 | 0x1B => 'CCFFFF', 26 | 0x1C => '660066', 27 | 0x1D => 'FF8080', 28 | 0x1E => '0066CC', 29 | 0x1F => 'CCCCFF', 30 | 0x20 => '000080', 31 | 0x21 => 'FF00FF', 32 | 0x22 => 'FFFF00', 33 | 0x23 => '00FFFF', 34 | 0x24 => '800080', 35 | 0x25 => '800000', 36 | 0x26 => '008080', 37 | 0x27 => '0000FF', 38 | 0x28 => '00CCFF', 39 | 0x29 => 'CCFFFF', 40 | 0x2A => 'CCFFCC', 41 | 0x2B => 'FFFF99', 42 | 0x2C => '99CCFF', 43 | 0x2D => 'FF99CC', 44 | 0x2E => 'CC99FF', 45 | 0x2F => 'FFCC99', 46 | 0x30 => '3366FF', 47 | 0x31 => '33CCCC', 48 | 0x32 => '99CC00', 49 | 0x33 => 'FFCC00', 50 | 0x34 => 'FF9900', 51 | 0x35 => 'FF6600', 52 | 0x36 => '666699', 53 | 0x37 => '969696', 54 | 0x38 => '003366', 55 | 0x39 => '339966', 56 | 0x3A => '003300', 57 | 0x3B => '333300', 58 | 0x3C => '993300', 59 | 0x3D => '993366', 60 | 0x3E => '333399', 61 | 0x3F => '333333', 62 | ); 63 | 64 | /** 65 | * Map color array from BIFF8 built-in color index 66 | * 67 | * @param int $color 68 | * @return array 69 | */ 70 | public static function lookup($color) 71 | { 72 | if (isset(self::$map[$color])) { 73 | return array('rgb' => self::$map[$color]); 74 | } 75 | return array('rgb' => '000000'); 76 | } 77 | } -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/Color/BuiltIn.php: -------------------------------------------------------------------------------- 1 | '000000', 7 | 0x01 => 'FFFFFF', 8 | 0x02 => 'FF0000', 9 | 0x03 => '00FF00', 10 | 0x04 => '0000FF', 11 | 0x05 => 'FFFF00', 12 | 0x06 => 'FF00FF', 13 | 0x07 => '00FFFF', 14 | 0x40 => '000000', // system window text color 15 | 0x41 => 'FFFFFF', // system window background color 16 | ); 17 | 18 | /** 19 | * Map built-in color to RGB value 20 | * 21 | * @param int $color Indexed color 22 | * @return array 23 | */ 24 | public static function lookup($color) 25 | { 26 | if (isset(self::$map[$color])) { 27 | return array('rgb' => self::$map[$color]); 28 | } 29 | return array('rgb' => '000000'); 30 | } 31 | } -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/ErrorCode.php: -------------------------------------------------------------------------------- 1 | '#NULL!', 7 | 0x07 => '#DIV/0!', 8 | 0x0F => '#VALUE!', 9 | 0x17 => '#REF!', 10 | 0x1D => '#NAME?', 11 | 0x24 => '#NUM!', 12 | 0x2A => '#N/A', 13 | ); 14 | 15 | /** 16 | * Map error code, e.g. '#N/A' 17 | * 18 | * @param int $code 19 | * @return string 20 | */ 21 | public static function lookup($code) 22 | { 23 | if (isset(self::$map[$code])) { 24 | return self::$map[$code]; 25 | } 26 | return false; 27 | } 28 | } -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/RC4.php: -------------------------------------------------------------------------------- 1 | i = 0; $this->i < 256; $this->i++) { 45 | $this->s[$this->i] = $this->i; 46 | } 47 | 48 | $this->j = 0; 49 | for ($this->i = 0; $this->i < 256; $this->i++) { 50 | $this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256; 51 | $t = $this->s[$this->i]; 52 | $this->s[$this->i] = $this->s[$this->j]; 53 | $this->s[$this->j] = $t; 54 | } 55 | $this->i = $this->j = 0; 56 | } 57 | 58 | /** 59 | * Symmetric decryption/encryption function 60 | * 61 | * @param string $data Data to encrypt/decrypt 62 | * 63 | * @return string 64 | */ 65 | public function RC4($data) 66 | { 67 | $len = strlen($data); 68 | for ($c = 0; $c < $len; $c++) { 69 | $this->i = ($this->i + 1) % 256; 70 | $this->j = ($this->j + $this->s[$this->i]) % 256; 71 | $t = $this->s[$this->i]; 72 | $this->s[$this->i] = $this->s[$this->j]; 73 | $this->s[$this->j] = $t; 74 | 75 | $t = ($this->s[$this->i] + $this->s[$this->j]) % 256; 76 | 77 | $data[$c] = chr(ord($data[$c]) ^ $this->s[$t]); 78 | } 79 | return $data; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/Style/Border.php: -------------------------------------------------------------------------------- 1 | PHPExcel_Style_Border::BORDER_NONE, 7 | 0x01 => PHPExcel_Style_Border::BORDER_THIN, 8 | 0x02 => PHPExcel_Style_Border::BORDER_MEDIUM, 9 | 0x03 => PHPExcel_Style_Border::BORDER_DASHED, 10 | 0x04 => PHPExcel_Style_Border::BORDER_DOTTED, 11 | 0x05 => PHPExcel_Style_Border::BORDER_THICK, 12 | 0x06 => PHPExcel_Style_Border::BORDER_DOUBLE, 13 | 0x07 => PHPExcel_Style_Border::BORDER_HAIR, 14 | 0x08 => PHPExcel_Style_Border::BORDER_MEDIUMDASHED, 15 | 0x09 => PHPExcel_Style_Border::BORDER_DASHDOT, 16 | 0x0A => PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT, 17 | 0x0B => PHPExcel_Style_Border::BORDER_DASHDOTDOT, 18 | 0x0C => PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT, 19 | 0x0D => PHPExcel_Style_Border::BORDER_SLANTDASHDOT, 20 | ); 21 | 22 | /** 23 | * Map border style 24 | * OpenOffice documentation: 2.5.11 25 | * 26 | * @param int $index 27 | * @return string 28 | */ 29 | public static function lookup($index) 30 | { 31 | if (isset(self::$map[$index])) { 32 | return self::$map[$index]; 33 | } 34 | return PHPExcel_Style_Border::BORDER_NONE; 35 | } 36 | } -------------------------------------------------------------------------------- /PHPExcel/Reader/Excel5/Style/FillPattern.php: -------------------------------------------------------------------------------- 1 | PHPExcel_Style_Fill::FILL_NONE, 7 | 0x01 => PHPExcel_Style_Fill::FILL_SOLID, 8 | 0x02 => PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY, 9 | 0x03 => PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY, 10 | 0x04 => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY, 11 | 0x05 => PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL, 12 | 0x06 => PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL, 13 | 0x07 => PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN, 14 | 0x08 => PHPExcel_Style_Fill::FILL_PATTERN_DARKUP, 15 | 0x09 => PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID, 16 | 0x0A => PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS, 17 | 0x0B => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL, 18 | 0x0C => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL, 19 | 0x0D => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN, 20 | 0x0E => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP, 21 | 0x0F => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID, 22 | 0x10 => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS, 23 | 0x11 => PHPExcel_Style_Fill::FILL_PATTERN_GRAY125, 24 | 0x12 => PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625, 25 | ); 26 | 27 | /** 28 | * Get fill pattern from index 29 | * OpenOffice documentation: 2.5.12 30 | * 31 | * @param int $index 32 | * @return string 33 | */ 34 | public static function lookup($index) 35 | { 36 | if (isset(self::$map[$index])) { 37 | return self::$map[$index]; 38 | } 39 | return PHPExcel_Style_Fill::FILL_NONE; 40 | } 41 | } -------------------------------------------------------------------------------- /PHPExcel/Reader/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 43 | $e->file = $file; 44 | throw $e; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /PHPExcel/Reader/IReadFilter.php: -------------------------------------------------------------------------------- 1 | setText($pText); 44 | $this->font = new PHPExcel_Style_Font(); 45 | } 46 | 47 | /** 48 | * Get font 49 | * 50 | * @return PHPExcel_Style_Font 51 | */ 52 | public function getFont() 53 | { 54 | return $this->font; 55 | } 56 | 57 | /** 58 | * Set font 59 | * 60 | * @param PHPExcel_Style_Font $pFont Font 61 | * @throws PHPExcel_Exception 62 | * @return PHPExcel_RichText_ITextElement 63 | */ 64 | public function setFont(PHPExcel_Style_Font $pFont = null) 65 | { 66 | $this->font = $pFont; 67 | return $this; 68 | } 69 | 70 | /** 71 | * Get hash code 72 | * 73 | * @return string Hash code 74 | */ 75 | public function getHashCode() 76 | { 77 | return md5( 78 | $this->getText() . 79 | $this->font->getHashCode() . 80 | __CLASS__ 81 | ); 82 | } 83 | 84 | /** 85 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 86 | */ 87 | public function __clone() 88 | { 89 | $vars = get_object_vars($this); 90 | foreach ($vars as $key => $value) { 91 | if (is_object($value)) { 92 | $this->$key = clone $value; 93 | } else { 94 | $this->$key = $value; 95 | } 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /PHPExcel/RichText/TextElement.php: -------------------------------------------------------------------------------- 1 | text = $pText; 44 | } 45 | 46 | /** 47 | * Get text 48 | * 49 | * @return string Text 50 | */ 51 | public function getText() 52 | { 53 | return $this->text; 54 | } 55 | 56 | /** 57 | * Set text 58 | * 59 | * @param $pText string Text 60 | * @return PHPExcel_RichText_ITextElement 61 | */ 62 | public function setText($pText = '') 63 | { 64 | $this->text = $pText; 65 | return $this; 66 | } 67 | 68 | /** 69 | * Get font 70 | * 71 | * @return PHPExcel_Style_Font 72 | */ 73 | public function getFont() 74 | { 75 | return null; 76 | } 77 | 78 | /** 79 | * Get hash code 80 | * 81 | * @return string Hash code 82 | */ 83 | public function getHashCode() 84 | { 85 | return md5( 86 | $this->text . 87 | __CLASS__ 88 | ); 89 | } 90 | 91 | /** 92 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 93 | */ 94 | public function __clone() 95 | { 96 | $vars = get_object_vars($this); 97 | foreach ($vars as $key => $value) { 98 | if (is_object($value)) { 99 | $this->$key = clone $value; 100 | } else { 101 | $this->$key = $value; 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /PHPExcel/Shared/Escher.php: -------------------------------------------------------------------------------- 1 | dggContainer; 52 | } 53 | 54 | /** 55 | * Set Drawing Group Container 56 | * 57 | * @param PHPExcel_Shared_Escher_DggContainer $dggContainer 58 | */ 59 | public function setDggContainer($dggContainer) 60 | { 61 | return $this->dggContainer = $dggContainer; 62 | } 63 | 64 | /** 65 | * Get Drawing Container 66 | * 67 | * @return PHPExcel_Shared_Escher_DgContainer 68 | */ 69 | public function getDgContainer() 70 | { 71 | return $this->dgContainer; 72 | } 73 | 74 | /** 75 | * Set Drawing Container 76 | * 77 | * @param PHPExcel_Shared_Escher_DgContainer $dgContainer 78 | */ 79 | public function setDgContainer($dgContainer) 80 | { 81 | return $this->dgContainer = $dgContainer; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /PHPExcel/Shared/Escher/DgContainer.php: -------------------------------------------------------------------------------- 1 | dgId; 49 | } 50 | 51 | public function setDgId($value) 52 | { 53 | $this->dgId = $value; 54 | } 55 | 56 | public function getLastSpId() 57 | { 58 | return $this->lastSpId; 59 | } 60 | 61 | public function setLastSpId($value) 62 | { 63 | $this->lastSpId = $value; 64 | } 65 | 66 | public function getSpgrContainer() 67 | { 68 | return $this->spgrContainer; 69 | } 70 | 71 | public function setSpgrContainer($spgrContainer) 72 | { 73 | return $this->spgrContainer = $spgrContainer; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php: -------------------------------------------------------------------------------- 1 | parent = $parent; 52 | } 53 | 54 | /** 55 | * Get the parent Shape Group Container if any 56 | * 57 | * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer|null 58 | */ 59 | public function getParent() 60 | { 61 | return $this->parent; 62 | } 63 | 64 | /** 65 | * Add a child. This will be either spgrContainer or spContainer 66 | * 67 | * @param mixed $child 68 | */ 69 | public function addChild($child) 70 | { 71 | $this->children[] = $child; 72 | $child->setParent($this); 73 | } 74 | 75 | /** 76 | * Get collection of Shape Containers 77 | */ 78 | public function getChildren() 79 | { 80 | return $this->children; 81 | } 82 | 83 | /** 84 | * Recursively get all spContainers within this spgrContainer 85 | * 86 | * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer[] 87 | */ 88 | public function getAllSpContainers() 89 | { 90 | $allSpContainers = array(); 91 | 92 | foreach ($this->children as $child) { 93 | if ($child instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) { 94 | $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers()); 95 | } else { 96 | $allSpContainers[] = $child; 97 | } 98 | } 99 | 100 | return $allSpContainers; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /PHPExcel/Shared/Escher/DggContainer/BstoreContainer.php: -------------------------------------------------------------------------------- 1 | BSECollection[] = $BSE; 45 | $BSE->setParent($this); 46 | } 47 | 48 | /** 49 | * Get the collection of BLIP Store Entries 50 | * 51 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE[] 52 | */ 53 | public function getBSECollection() 54 | { 55 | return $this->BSECollection; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php: -------------------------------------------------------------------------------- 1 | parent = $parent; 70 | } 71 | 72 | /** 73 | * Get the BLIP 74 | * 75 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip 76 | */ 77 | public function getBlip() 78 | { 79 | return $this->blip; 80 | } 81 | 82 | /** 83 | * Set the BLIP 84 | * 85 | * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip $blip 86 | */ 87 | public function setBlip($blip) 88 | { 89 | $this->blip = $blip; 90 | $blip->setParent($this); 91 | } 92 | 93 | /** 94 | * Get the BLIP type 95 | * 96 | * @return int 97 | */ 98 | public function getBlipType() 99 | { 100 | return $this->blipType; 101 | } 102 | 103 | /** 104 | * Set the BLIP type 105 | * 106 | * @param int 107 | */ 108 | public function setBlipType($blipType) 109 | { 110 | $this->blipType = $blipType; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php: -------------------------------------------------------------------------------- 1 | data; 52 | } 53 | 54 | /** 55 | * Set the raw image data 56 | * 57 | * @param string 58 | */ 59 | public function setData($data) 60 | { 61 | $this->data = $data; 62 | } 63 | 64 | /** 65 | * Set parent BSE 66 | * 67 | * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent 68 | */ 69 | public function setParent($parent) 70 | { 71 | $this->parent = $parent; 72 | } 73 | 74 | /** 75 | * Get parent BSE 76 | * 77 | * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent 78 | */ 79 | public function getParent() 80 | { 81 | return $this->parent; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /PHPExcel/Shared/JAMA/CHANGELOG.TXT: -------------------------------------------------------------------------------- 1 | Mar 1, 2005 11:15 AST by PM 2 | 3 | + For consistency, renamed Math.php to Maths.java, utils to util, 4 | tests to test, docs to doc - 5 | 6 | + Removed conditional logic from top of Matrix class. 7 | 8 | + Switched to using hypo function in Maths.php for all php-hypot calls. 9 | NOTE TO SELF: Need to make sure that all decompositions have been 10 | switched over to using the bundled hypo. 11 | 12 | Feb 25, 2005 at 10:00 AST by PM 13 | 14 | + Recommend using simpler Error.php instead of JAMA_Error.php but 15 | can be persuaded otherwise. 16 | 17 | -------------------------------------------------------------------------------- /PHPExcel/Shared/JAMA/utils/Error.php: -------------------------------------------------------------------------------- 1 | abs($b)) { 17 | $r = $b / $a; 18 | $r = abs($a) * sqrt(1 + $r * $r); 19 | } elseif ($b != 0) { 20 | $r = $a / $b; 21 | $r = abs($b) * sqrt(1 + $r * $r); 22 | } else { 23 | $r = 0.0; 24 | } 25 | return $r; 26 | } // function hypo() 27 | 28 | 29 | /** 30 | * Mike Bommarito's version. 31 | * Compute n-dimensional hyotheneuse. 32 | * 33 | function hypot() { 34 | $s = 0; 35 | foreach (func_get_args() as $d) { 36 | if (is_numeric($d)) { 37 | $s += pow($d, 2); 38 | } else { 39 | throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION)); 40 | } 41 | } 42 | return sqrt($s); 43 | } 44 | */ 45 | -------------------------------------------------------------------------------- /PHPExcel/Shared/OLE/PPS/File.php: -------------------------------------------------------------------------------- 1 | | 17 | // | Based on OLE::Storage_Lite by Kawai, Takanori | 18 | // +----------------------------------------------------------------------+ 19 | // 20 | // $Id: File.php,v 1.11 2007/02/13 21:00:42 schmidt Exp $ 21 | 22 | 23 | /** 24 | * Class for creating File PPS's for OLE containers 25 | * 26 | * @author Xavier Noguer 27 | * @category PHPExcel 28 | * @package PHPExcel_Shared_OLE 29 | */ 30 | class PHPExcel_Shared_OLE_PPS_File extends PHPExcel_Shared_OLE_PPS 31 | { 32 | /** 33 | * The constructor 34 | * 35 | * @access public 36 | * @param string $name The name of the file (in Unicode) 37 | * @see OLE::Asc2Ucs() 38 | */ 39 | public function __construct($name) 40 | { 41 | parent::__construct(null, $name, PHPExcel_Shared_OLE::OLE_PPS_TYPE_FILE, null, null, null, null, null, '', array()); 42 | } 43 | 44 | /** 45 | * Initialization method. Has to be called right after OLE_PPS_File(). 46 | * 47 | * @access public 48 | * @return mixed true on success 49 | */ 50 | public function init() 51 | { 52 | return true; 53 | } 54 | 55 | /** 56 | * Append data to PPS 57 | * 58 | * @access public 59 | * @param string $data The data to append 60 | */ 61 | public function append($data) 62 | { 63 | $this->_data .= $data; 64 | } 65 | 66 | /** 67 | * Returns a stream for reading this file using fread() etc. 68 | * @return resource a read-only stream 69 | */ 70 | public function getStream() 71 | { 72 | $this->ole->getStream($this); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /PHPExcel/Shared/PasswordHasher.php: -------------------------------------------------------------------------------- 1 | . 44 | * 45 | * @param string $pPassword Password to hash 46 | * @return string Hashed password 47 | */ 48 | public static function hashPassword($pPassword = '') 49 | { 50 | $password = 0x0000; 51 | $charPos = 1; // char position 52 | 53 | // split the plain text password in its component characters 54 | $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY); 55 | foreach ($chars as $char) { 56 | $value = ord($char) << $charPos++; // shifted ASCII value 57 | $rotated_bits = $value >> 15; // rotated bits beyond bit 15 58 | $value &= 0x7fff; // first 15 bits 59 | $password ^= ($value | $rotated_bits); 60 | } 61 | 62 | $password ^= strlen($pPassword); 63 | $password ^= 0xCE4B; 64 | 65 | return(strtoupper(dechex($password))); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /PHPExcel/Shared/XMLWriter.php: -------------------------------------------------------------------------------- 1 | openMemory(); 60 | } else { 61 | // Create temporary filename 62 | if ($pTemporaryStorageFolder === null) { 63 | $pTemporaryStorageFolder = PHPExcel_Shared_File::sys_get_temp_dir(); 64 | } 65 | $this->tempFileName = @tempnam($pTemporaryStorageFolder, 'xml'); 66 | 67 | // Open storage 68 | if ($this->openUri($this->tempFileName) === false) { 69 | // Fallback to memory... 70 | $this->openMemory(); 71 | } 72 | } 73 | 74 | // Set default values 75 | if (DEBUGMODE_ENABLED) { 76 | $this->setIndent(true); 77 | } 78 | } 79 | 80 | /** 81 | * Destructor 82 | */ 83 | public function __destruct() 84 | { 85 | // Unlink temporary files 86 | if ($this->tempFileName != '') { 87 | @unlink($this->tempFileName); 88 | } 89 | } 90 | 91 | /** 92 | * Get written data 93 | * 94 | * @return $data 95 | */ 96 | public function getData() 97 | { 98 | if ($this->tempFileName == '') { 99 | return $this->outputMemory(true); 100 | } else { 101 | $this->flush(); 102 | return file_get_contents($this->tempFileName); 103 | } 104 | } 105 | 106 | /** 107 | * Fallback method for writeRaw, introduced in PHP 5.2 108 | * 109 | * @param string $text 110 | * @return string 111 | */ 112 | public function writeRawData($text) 113 | { 114 | if (is_array($text)) { 115 | $text = implode("\n", $text); 116 | } 117 | 118 | if (method_exists($this, 'writeRaw')) { 119 | return $this->writeRaw(htmlspecialchars($text)); 120 | } 121 | 122 | return $this->text($text); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /PHPExcel/Shared/trend/linearBestFitClass.php: -------------------------------------------------------------------------------- 1 | getIntersect() + $this->getSlope() * $xValue; 49 | } 50 | 51 | /** 52 | * Return the X-Value for a specified value of Y 53 | * 54 | * @param float $yValue Y-Value 55 | * @return float X-Value 56 | **/ 57 | public function getValueOfXForY($yValue) 58 | { 59 | return ($yValue - $this->getIntersect()) / $this->getSlope(); 60 | } 61 | 62 | 63 | /** 64 | * Return the Equation of the best-fit line 65 | * 66 | * @param int $dp Number of places of decimal precision to display 67 | * @return string 68 | **/ 69 | public function getEquation($dp = 0) 70 | { 71 | $slope = $this->getSlope($dp); 72 | $intersect = $this->getIntersect($dp); 73 | 74 | return 'Y = ' . $intersect . ' + ' . $slope . ' * X'; 75 | } 76 | 77 | /** 78 | * Execute the regression and calculate the goodness of fit for a set of X and Y data values 79 | * 80 | * @param float[] $yValues The set of Y-values for this regression 81 | * @param float[] $xValues The set of X-values for this regression 82 | * @param boolean $const 83 | */ 84 | private function linearRegression($yValues, $xValues, $const) 85 | { 86 | $this->leastSquareFit($yValues, $xValues, $const); 87 | } 88 | 89 | /** 90 | * Define the regression and calculate the goodness of fit for a set of X and Y data values 91 | * 92 | * @param float[] $yValues The set of Y-values for this regression 93 | * @param float[] $xValues The set of X-values for this regression 94 | * @param boolean $const 95 | */ 96 | public function __construct($yValues, $xValues = array(), $const = true) 97 | { 98 | if (parent::__construct($yValues, $xValues) !== false) { 99 | $this->linearRegression($yValues, $xValues, $const); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /PHPExcel/Shared/trend/logarithmicBestFitClass.php: -------------------------------------------------------------------------------- 1 | getIntersect() + $this->getSlope() * log($xValue - $this->xOffset); 49 | } 50 | 51 | /** 52 | * Return the X-Value for a specified value of Y 53 | * 54 | * @param float $yValue Y-Value 55 | * @return float X-Value 56 | **/ 57 | public function getValueOfXForY($yValue) 58 | { 59 | return exp(($yValue - $this->getIntersect()) / $this->getSlope()); 60 | } 61 | 62 | /** 63 | * Return the Equation of the best-fit line 64 | * 65 | * @param int $dp Number of places of decimal precision to display 66 | * @return string 67 | **/ 68 | public function getEquation($dp = 0) 69 | { 70 | $slope = $this->getSlope($dp); 71 | $intersect = $this->getIntersect($dp); 72 | 73 | return 'Y = '.$intersect.' + '.$slope.' * log(X)'; 74 | } 75 | 76 | /** 77 | * Execute the regression and calculate the goodness of fit for a set of X and Y data values 78 | * 79 | * @param float[] $yValues The set of Y-values for this regression 80 | * @param float[] $xValues The set of X-values for this regression 81 | * @param boolean $const 82 | */ 83 | private function logarithmicRegression($yValues, $xValues, $const) 84 | { 85 | foreach ($xValues as &$value) { 86 | if ($value < 0.0) { 87 | $value = 0 - log(abs($value)); 88 | } elseif ($value > 0.0) { 89 | $value = log($value); 90 | } 91 | } 92 | unset($value); 93 | 94 | $this->leastSquareFit($yValues, $xValues, $const); 95 | } 96 | 97 | /** 98 | * Define the regression and calculate the goodness of fit for a set of X and Y data values 99 | * 100 | * @param float[] $yValues The set of Y-values for this regression 101 | * @param float[] $xValues The set of X-values for this regression 102 | * @param boolean $const 103 | */ 104 | public function __construct($yValues, $xValues = array(), $const = true) 105 | { 106 | if (parent::__construct($yValues, $xValues) !== false) { 107 | $this->logarithmicRegression($yValues, $xValues, $const); 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /PHPExcel/Style/Supervisor.php: -------------------------------------------------------------------------------- 1 | isSupervisor = $isSupervisor; 55 | } 56 | 57 | /** 58 | * Bind parent. Only used for supervisor 59 | * 60 | * @param PHPExcel $parent 61 | * @return PHPExcel_Style_Supervisor 62 | */ 63 | public function bindParent($parent, $parentPropertyName = null) 64 | { 65 | $this->parent = $parent; 66 | return $this; 67 | } 68 | 69 | /** 70 | * Is this a supervisor or a cell style component? 71 | * 72 | * @return boolean 73 | */ 74 | public function getIsSupervisor() 75 | { 76 | return $this->isSupervisor; 77 | } 78 | 79 | /** 80 | * Get the currently active sheet. Only used for supervisor 81 | * 82 | * @return PHPExcel_Worksheet 83 | */ 84 | public function getActiveSheet() 85 | { 86 | return $this->parent->getActiveSheet(); 87 | } 88 | 89 | /** 90 | * Get the currently active cell coordinate in currently active sheet. 91 | * Only used for supervisor 92 | * 93 | * @return string E.g. 'A1' 94 | */ 95 | public function getSelectedCells() 96 | { 97 | return $this->getActiveSheet()->getSelectedCells(); 98 | } 99 | 100 | /** 101 | * Get the currently active cell coordinate in currently active sheet. 102 | * Only used for supervisor 103 | * 104 | * @return string E.g. 'A1' 105 | */ 106 | public function getActiveCell() 107 | { 108 | return $this->getActiveSheet()->getActiveCell(); 109 | } 110 | 111 | /** 112 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 113 | */ 114 | public function __clone() 115 | { 116 | $vars = get_object_vars($this); 117 | foreach ($vars as $key => $value) { 118 | if ((is_object($value)) && ($key != 'parent')) { 119 | $this->$key = clone $value; 120 | } else { 121 | $this->$key = $value; 122 | } 123 | } 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /PHPExcel/Worksheet/CellIterator.php: -------------------------------------------------------------------------------- 1 | subject); 57 | } 58 | 59 | /** 60 | * Get loop only existing cells 61 | * 62 | * @return boolean 63 | */ 64 | public function getIterateOnlyExistingCells() 65 | { 66 | return $this->onlyExistingCells; 67 | } 68 | 69 | /** 70 | * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary 71 | * 72 | * @throws PHPExcel_Exception 73 | */ 74 | abstract protected function adjustForExistingOnlyRange(); 75 | 76 | /** 77 | * Set the iterator to loop only existing cells 78 | * 79 | * @param boolean $value 80 | * @throws PHPExcel_Exception 81 | */ 82 | public function setIterateOnlyExistingCells($value = true) 83 | { 84 | $this->onlyExistingCells = (boolean) $value; 85 | 86 | $this->adjustForExistingOnlyRange(); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /PHPExcel/Worksheet/Column.php: -------------------------------------------------------------------------------- 1 | parent = $parent; 54 | $this->columnIndex = $columnIndex; 55 | } 56 | 57 | /** 58 | * Destructor 59 | */ 60 | public function __destruct() 61 | { 62 | unset($this->parent); 63 | } 64 | 65 | /** 66 | * Get column index 67 | * 68 | * @return string 69 | */ 70 | public function getColumnIndex() 71 | { 72 | return $this->columnIndex; 73 | } 74 | 75 | /** 76 | * Get cell iterator 77 | * 78 | * @param integer $startRow The row number at which to start iterating 79 | * @param integer $endRow Optionally, the row number at which to stop iterating 80 | * @return PHPExcel_Worksheet_CellIterator 81 | */ 82 | public function getCellIterator($startRow = 1, $endRow = null) 83 | { 84 | return new PHPExcel_Worksheet_ColumnCellIterator($this->parent, $this->columnIndex, $startRow, $endRow); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /PHPExcel/Worksheet/ColumnDimension.php: -------------------------------------------------------------------------------- 1 | columnIndex = $pIndex; 62 | 63 | // set dimension as unformatted by default 64 | parent::__construct(0); 65 | } 66 | 67 | /** 68 | * Get ColumnIndex 69 | * 70 | * @return string 71 | */ 72 | public function getColumnIndex() 73 | { 74 | return $this->columnIndex; 75 | } 76 | 77 | /** 78 | * Set ColumnIndex 79 | * 80 | * @param string $pValue 81 | * @return PHPExcel_Worksheet_ColumnDimension 82 | */ 83 | public function setColumnIndex($pValue) 84 | { 85 | $this->columnIndex = $pValue; 86 | return $this; 87 | } 88 | 89 | /** 90 | * Get Width 91 | * 92 | * @return double 93 | */ 94 | public function getWidth() 95 | { 96 | return $this->width; 97 | } 98 | 99 | /** 100 | * Set Width 101 | * 102 | * @param double $pValue 103 | * @return PHPExcel_Worksheet_ColumnDimension 104 | */ 105 | public function setWidth($pValue = -1) 106 | { 107 | $this->width = $pValue; 108 | return $this; 109 | } 110 | 111 | /** 112 | * Get Auto Size 113 | * 114 | * @return bool 115 | */ 116 | public function getAutoSize() 117 | { 118 | return $this->autoSize; 119 | } 120 | 121 | /** 122 | * Set Auto Size 123 | * 124 | * @param bool $pValue 125 | * @return PHPExcel_Worksheet_ColumnDimension 126 | */ 127 | public function setAutoSize($pValue = false) 128 | { 129 | $this->autoSize = $pValue; 130 | return $this; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /PHPExcel/Worksheet/Drawing.php: -------------------------------------------------------------------------------- 1 | path = ''; 44 | 45 | // Initialize parent 46 | parent::__construct(); 47 | } 48 | 49 | /** 50 | * Get Filename 51 | * 52 | * @return string 53 | */ 54 | public function getFilename() 55 | { 56 | return basename($this->path); 57 | } 58 | 59 | /** 60 | * Get indexed filename (using image index) 61 | * 62 | * @return string 63 | */ 64 | public function getIndexedFilename() 65 | { 66 | $fileName = $this->getFilename(); 67 | $fileName = str_replace(' ', '_', $fileName); 68 | return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension(); 69 | } 70 | 71 | /** 72 | * Get Extension 73 | * 74 | * @return string 75 | */ 76 | public function getExtension() 77 | { 78 | $exploded = explode(".", basename($this->path)); 79 | return $exploded[count($exploded) - 1]; 80 | } 81 | 82 | /** 83 | * Get Path 84 | * 85 | * @return string 86 | */ 87 | public function getPath() 88 | { 89 | return $this->path; 90 | } 91 | 92 | /** 93 | * Set Path 94 | * 95 | * @param string $pValue File path 96 | * @param boolean $pVerifyFile Verify file 97 | * @throws PHPExcel_Exception 98 | * @return PHPExcel_Worksheet_Drawing 99 | */ 100 | public function setPath($pValue = '', $pVerifyFile = true) 101 | { 102 | if ($pVerifyFile) { 103 | if (file_exists($pValue)) { 104 | $this->path = $pValue; 105 | 106 | if ($this->width == 0 && $this->height == 0) { 107 | // Get width/height 108 | list($this->width, $this->height) = getimagesize($pValue); 109 | } 110 | } else { 111 | throw new PHPExcel_Exception("File $pValue not found!"); 112 | } 113 | } else { 114 | $this->path = $pValue; 115 | } 116 | return $this; 117 | } 118 | 119 | /** 120 | * Get hash code 121 | * 122 | * @return string Hash code 123 | */ 124 | public function getHashCode() 125 | { 126 | return md5( 127 | $this->path . 128 | parent::getHashCode() . 129 | __CLASS__ 130 | ); 131 | } 132 | 133 | /** 134 | * Implement PHP __clone to create a deep clone, not just a shallow copy. 135 | */ 136 | public function __clone() 137 | { 138 | $vars = get_object_vars($this); 139 | foreach ($vars as $key => $value) { 140 | if (is_object($value)) { 141 | $this->$key = clone $value; 142 | } else { 143 | $this->$key = $value; 144 | } 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /PHPExcel/Worksheet/Row.php: -------------------------------------------------------------------------------- 1 | parent = $parent; 54 | $this->rowIndex = $rowIndex; 55 | } 56 | 57 | /** 58 | * Destructor 59 | */ 60 | public function __destruct() 61 | { 62 | unset($this->parent); 63 | } 64 | 65 | /** 66 | * Get row index 67 | * 68 | * @return int 69 | */ 70 | public function getRowIndex() 71 | { 72 | return $this->rowIndex; 73 | } 74 | 75 | /** 76 | * Get cell iterator 77 | * 78 | * @param string $startColumn The column address at which to start iterating 79 | * @param string $endColumn Optionally, the column address at which to stop iterating 80 | * @return PHPExcel_Worksheet_CellIterator 81 | */ 82 | public function getCellIterator($startColumn = 'A', $endColumn = null) 83 | { 84 | return new PHPExcel_Worksheet_RowCellIterator($this->parent, $this->rowIndex, $startColumn, $endColumn); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /PHPExcel/Worksheet/RowDimension.php: -------------------------------------------------------------------------------- 1 | rowIndex = $pIndex; 62 | 63 | // set dimension as unformatted by default 64 | parent::__construct(null); 65 | } 66 | 67 | /** 68 | * Get Row Index 69 | * 70 | * @return int 71 | */ 72 | public function getRowIndex() 73 | { 74 | return $this->rowIndex; 75 | } 76 | 77 | /** 78 | * Set Row Index 79 | * 80 | * @param int $pValue 81 | * @return PHPExcel_Worksheet_RowDimension 82 | */ 83 | public function setRowIndex($pValue) 84 | { 85 | $this->rowIndex = $pValue; 86 | return $this; 87 | } 88 | 89 | /** 90 | * Get Row Height 91 | * 92 | * @return double 93 | */ 94 | public function getRowHeight() 95 | { 96 | return $this->height; 97 | } 98 | 99 | /** 100 | * Set Row Height 101 | * 102 | * @param double $pValue 103 | * @return PHPExcel_Worksheet_RowDimension 104 | */ 105 | public function setRowHeight($pValue = -1) 106 | { 107 | $this->height = $pValue; 108 | return $this; 109 | } 110 | 111 | /** 112 | * Get ZeroHeight 113 | * 114 | * @return bool 115 | */ 116 | public function getZeroHeight() 117 | { 118 | return $this->zeroHeight; 119 | } 120 | 121 | /** 122 | * Set ZeroHeight 123 | * 124 | * @param bool $pValue 125 | * @return PHPExcel_Worksheet_RowDimension 126 | */ 127 | public function setZeroHeight($pValue = false) 128 | { 129 | $this->zeroHeight = $pValue; 130 | return $this; 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /PHPExcel/WorksheetIterator.php: -------------------------------------------------------------------------------- 1 | subject = $subject; 53 | } 54 | 55 | /** 56 | * Destructor 57 | */ 58 | public function __destruct() 59 | { 60 | unset($this->subject); 61 | } 62 | 63 | /** 64 | * Rewind iterator 65 | */ 66 | public function rewind() 67 | { 68 | $this->position = 0; 69 | } 70 | 71 | /** 72 | * Current PHPExcel_Worksheet 73 | * 74 | * @return PHPExcel_Worksheet 75 | */ 76 | public function current() 77 | { 78 | return $this->subject->getSheet($this->position); 79 | } 80 | 81 | /** 82 | * Current key 83 | * 84 | * @return int 85 | */ 86 | public function key() 87 | { 88 | return $this->position; 89 | } 90 | 91 | /** 92 | * Next value 93 | */ 94 | public function next() 95 | { 96 | ++$this->position; 97 | } 98 | 99 | /** 100 | * More PHPExcel_Worksheet instances available? 101 | * 102 | * @return boolean 103 | */ 104 | public function valid() 105 | { 106 | return $this->position < $this->subject->getSheetCount(); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /PHPExcel/Writer/Excel2007/RelsRibbon.php: -------------------------------------------------------------------------------- 1 | getParentWriter()->getUseDiskCaching()) { 42 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 43 | } else { 44 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 45 | } 46 | 47 | // XML header 48 | $objWriter->startDocument('1.0', 'UTF-8', 'yes'); 49 | 50 | // Relationships 51 | $objWriter->startElement('Relationships'); 52 | $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); 53 | $localRels = $pPHPExcel->getRibbonBinObjects('names'); 54 | if (is_array($localRels)) { 55 | foreach ($localRels as $aId => $aTarget) { 56 | $objWriter->startElement('Relationship'); 57 | $objWriter->writeAttribute('Id', $aId); 58 | $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'); 59 | $objWriter->writeAttribute('Target', $aTarget); 60 | $objWriter->endElement(); 61 | } 62 | } 63 | $objWriter->endElement(); 64 | 65 | return $objWriter->getData(); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /PHPExcel/Writer/Excel2007/RelsVBA.php: -------------------------------------------------------------------------------- 1 | getParentWriter()->getUseDiskCaching()) { 42 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 43 | } else { 44 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 45 | } 46 | 47 | // XML header 48 | $objWriter->startDocument('1.0', 'UTF-8', 'yes'); 49 | 50 | // Relationships 51 | $objWriter->startElement('Relationships'); 52 | $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); 53 | $objWriter->startElement('Relationship'); 54 | $objWriter->writeAttribute('Id', 'rId1'); 55 | $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature'); 56 | $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin'); 57 | $objWriter->endElement(); 58 | $objWriter->endElement(); 59 | 60 | return $objWriter->getData(); 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /PHPExcel/Writer/Excel2007/WriterPart.php: -------------------------------------------------------------------------------- 1 | parentWriter = $pWriter; 46 | } 47 | 48 | /** 49 | * Get parent IWriter object 50 | * 51 | * @return PHPExcel_Writer_IWriter 52 | * @throws PHPExcel_Writer_Exception 53 | */ 54 | public function getParentWriter() 55 | { 56 | if (!is_null($this->parentWriter)) { 57 | return $this->parentWriter; 58 | } else { 59 | throw new PHPExcel_Writer_Exception("No parent PHPExcel_Writer_IWriter assigned."); 60 | } 61 | } 62 | 63 | /** 64 | * Set parent IWriter object 65 | * 66 | * @param PHPExcel_Writer_IWriter $pWriter 67 | * @throws PHPExcel_Writer_Exception 68 | */ 69 | public function __construct(PHPExcel_Writer_IWriter $pWriter = null) 70 | { 71 | if (!is_null($pWriter)) { 72 | $this->parentWriter = $pWriter; 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /PHPExcel/Writer/Exception.php: -------------------------------------------------------------------------------- 1 | line = $line; 43 | $e->file = $file; 44 | throw $e; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /PHPExcel/Writer/IWriter.php: -------------------------------------------------------------------------------- 1 | 36 | */ 37 | class PHPExcel_Writer_OpenDocument_Cell_Comment 38 | { 39 | public static function write(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Cell $cell) 40 | { 41 | $comments = $cell->getWorksheet()->getComments(); 42 | if (!isset($comments[$cell->getCoordinate()])) { 43 | return; 44 | } 45 | $comment = $comments[$cell->getCoordinate()]; 46 | 47 | $objWriter->startElement('office:annotation'); 48 | //$objWriter->writeAttribute('draw:style-name', 'gr1'); 49 | //$objWriter->writeAttribute('draw:text-style-name', 'P1'); 50 | $objWriter->writeAttribute('svg:width', $comment->getWidth()); 51 | $objWriter->writeAttribute('svg:height', $comment->getHeight()); 52 | $objWriter->writeAttribute('svg:x', $comment->getMarginLeft()); 53 | $objWriter->writeAttribute('svg:y', $comment->getMarginTop()); 54 | //$objWriter->writeAttribute('draw:caption-point-x', $comment->getMarginLeft()); 55 | //$objWriter->writeAttribute('draw:caption-point-y', $comment->getMarginTop()); 56 | $objWriter->writeElement('dc:creator', $comment->getAuthor()); 57 | // TODO: Not realized in PHPExcel_Comment yet. 58 | //$objWriter->writeElement('dc:date', $comment->getDate()); 59 | $objWriter->writeElement('text:p', $comment->getText()->getPlainText()); 60 | //$objWriter->writeAttribute('draw:text-style-name', 'P1'); 61 | $objWriter->endElement(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /PHPExcel/Writer/OpenDocument/Meta.php: -------------------------------------------------------------------------------- 1 | getParentWriter()->getPHPExcel(); 41 | } 42 | 43 | $objWriter = null; 44 | if ($this->getParentWriter()->getUseDiskCaching()) { 45 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 46 | } else { 47 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 48 | } 49 | 50 | // XML header 51 | $objWriter->startDocument('1.0', 'UTF-8'); 52 | 53 | // Meta 54 | $objWriter->startElement('office:document-meta'); 55 | 56 | $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); 57 | $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); 58 | $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); 59 | $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); 60 | $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); 61 | $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); 62 | $objWriter->writeAttribute('office:version', '1.2'); 63 | 64 | $objWriter->startElement('office:meta'); 65 | 66 | $objWriter->writeElement('meta:initial-creator', $pPHPExcel->getProperties()->getCreator()); 67 | $objWriter->writeElement('dc:creator', $pPHPExcel->getProperties()->getCreator()); 68 | $objWriter->writeElement('meta:creation-date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated())); 69 | $objWriter->writeElement('dc:date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated())); 70 | $objWriter->writeElement('dc:title', $pPHPExcel->getProperties()->getTitle()); 71 | $objWriter->writeElement('dc:description', $pPHPExcel->getProperties()->getDescription()); 72 | $objWriter->writeElement('dc:subject', $pPHPExcel->getProperties()->getSubject()); 73 | $keywords = explode(' ', $pPHPExcel->getProperties()->getKeywords()); 74 | foreach ($keywords as $keyword) { 75 | $objWriter->writeElement('meta:keyword', $keyword); 76 | } 77 | 78 | // 79 | $objWriter->startElement('meta:user-defined'); 80 | $objWriter->writeAttribute('meta:name', 'Company'); 81 | $objWriter->writeRaw($pPHPExcel->getProperties()->getCompany()); 82 | $objWriter->endElement(); 83 | 84 | $objWriter->startElement('meta:user-defined'); 85 | $objWriter->writeAttribute('meta:name', 'category'); 86 | $objWriter->writeRaw($pPHPExcel->getProperties()->getCategory()); 87 | $objWriter->endElement(); 88 | 89 | $objWriter->endElement(); 90 | 91 | $objWriter->endElement(); 92 | 93 | return $objWriter->getData(); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /PHPExcel/Writer/OpenDocument/MetaInf.php: -------------------------------------------------------------------------------- 1 | getParentWriter()->getPHPExcel(); 41 | } 42 | 43 | $objWriter = null; 44 | if ($this->getParentWriter()->getUseDiskCaching()) { 45 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 46 | } else { 47 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 48 | } 49 | 50 | // XML header 51 | $objWriter->startDocument('1.0', 'UTF-8'); 52 | 53 | // Manifest 54 | $objWriter->startElement('manifest:manifest'); 55 | $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0'); 56 | $objWriter->writeAttribute('manifest:version', '1.2'); 57 | 58 | $objWriter->startElement('manifest:file-entry'); 59 | $objWriter->writeAttribute('manifest:full-path', '/'); 60 | $objWriter->writeAttribute('manifest:version', '1.2'); 61 | $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet'); 62 | $objWriter->endElement(); 63 | $objWriter->startElement('manifest:file-entry'); 64 | $objWriter->writeAttribute('manifest:full-path', 'meta.xml'); 65 | $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 66 | $objWriter->endElement(); 67 | $objWriter->startElement('manifest:file-entry'); 68 | $objWriter->writeAttribute('manifest:full-path', 'settings.xml'); 69 | $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 70 | $objWriter->endElement(); 71 | $objWriter->startElement('manifest:file-entry'); 72 | $objWriter->writeAttribute('manifest:full-path', 'content.xml'); 73 | $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 74 | $objWriter->endElement(); 75 | $objWriter->startElement('manifest:file-entry'); 76 | $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png'); 77 | $objWriter->writeAttribute('manifest:media-type', 'image/png'); 78 | $objWriter->endElement(); 79 | $objWriter->startElement('manifest:file-entry'); 80 | $objWriter->writeAttribute('manifest:full-path', 'styles.xml'); 81 | $objWriter->writeAttribute('manifest:media-type', 'text/xml'); 82 | $objWriter->endElement(); 83 | $objWriter->endElement(); 84 | 85 | return $objWriter->getData(); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /PHPExcel/Writer/OpenDocument/Mimetype.php: -------------------------------------------------------------------------------- 1 | getParentWriter()->getPHPExcel(); 41 | } 42 | 43 | $objWriter = null; 44 | if ($this->getParentWriter()->getUseDiskCaching()) { 45 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); 46 | } else { 47 | $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); 48 | } 49 | 50 | // XML header 51 | $objWriter->startDocument('1.0', 'UTF-8'); 52 | 53 | // Settings 54 | $objWriter->startElement('office:document-settings'); 55 | $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); 56 | $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); 57 | $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0'); 58 | $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); 59 | $objWriter->writeAttribute('office:version', '1.2'); 60 | 61 | $objWriter->startElement('office:settings'); 62 | $objWriter->startElement('config:config-item-set'); 63 | $objWriter->writeAttribute('config:name', 'ooo:view-settings'); 64 | $objWriter->startElement('config:config-item-map-indexed'); 65 | $objWriter->writeAttribute('config:name', 'Views'); 66 | $objWriter->endElement(); 67 | $objWriter->endElement(); 68 | $objWriter->startElement('config:config-item-set'); 69 | $objWriter->writeAttribute('config:name', 'ooo:configuration-settings'); 70 | $objWriter->endElement(); 71 | $objWriter->endElement(); 72 | $objWriter->endElement(); 73 | 74 | return $objWriter->getData(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /PHPExcel/Writer/OpenDocument/Thumbnails.php: -------------------------------------------------------------------------------- 1 | renderer = new $rendererName($phpExcel); 63 | } 64 | 65 | 66 | /** 67 | * Magic method to handle direct calls to the configured PDF renderer wrapper class. 68 | * 69 | * @param string $name Renderer library method name 70 | * @param mixed[] $arguments Array of arguments to pass to the renderer method 71 | * @return mixed Returned data from the PDF renderer wrapper method 72 | */ 73 | public function __call($name, $arguments) 74 | { 75 | if ($this->renderer === null) { 76 | throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined."); 77 | } 78 | 79 | return call_user_func_array(array($this->renderer, $name), $arguments); 80 | } 81 | 82 | /** 83 | * {@inheritdoc} 84 | */ 85 | public function save($pFilename = null) 86 | { 87 | $this->renderer->save($pFilename); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /PHPExcel/Writer/PDF/DomPDF.php: -------------------------------------------------------------------------------- 1 | getSheetIndex())) { 63 | $orientation = ($this->phpExcel->getSheet(0)->getPageSetup()->getOrientation() 64 | == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; 65 | $printPaperSize = $this->phpExcel->getSheet(0)->getPageSetup()->getPaperSize(); 66 | $printMargins = $this->phpExcel->getSheet(0)->getPageMargins(); 67 | } else { 68 | $orientation = ($this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() 69 | == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; 70 | $printPaperSize = $this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); 71 | $printMargins = $this->phpExcel->getSheet($this->getSheetIndex())->getPageMargins(); 72 | } 73 | 74 | $orientation = ($orientation == 'L') ? 'landscape' : 'portrait'; 75 | 76 | // Override Page Orientation 77 | if (!is_null($this->getOrientation())) { 78 | $orientation = ($this->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) 79 | ? PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT 80 | : $this->getOrientation(); 81 | } 82 | // Override Paper Size 83 | if (!is_null($this->getPaperSize())) { 84 | $printPaperSize = $this->getPaperSize(); 85 | } 86 | 87 | if (isset(self::$paperSizes[$printPaperSize])) { 88 | $paperSize = self::$paperSizes[$printPaperSize]; 89 | } 90 | 91 | 92 | // Create PDF 93 | $pdf = new DOMPDF(); 94 | $pdf->set_paper(strtolower($paperSize), $orientation); 95 | 96 | $pdf->load_html( 97 | $this->generateHTMLHeader(false) . 98 | $this->generateSheetData() . 99 | $this->generateHTMLFooter() 100 | ); 101 | $pdf->render(); 102 | 103 | // Write to file 104 | fwrite($fileHandle, $pdf->output()); 105 | 106 | parent::restoreStateAfterSave($fileHandle); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /PHPExcel/locale/bg/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | 5 | ## Copyright (c) 2006 - 2013 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_Settings 23 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 24 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 25 | ## @version ##VERSION##, ##DATE## 26 | ## 27 | ## 28 | 29 | 30 | ArgumentSeparator = ; 31 | 32 | 33 | ## 34 | ## (For future use) 35 | ## 36 | currencySymbol = лв 37 | 38 | 39 | ## 40 | ## Excel Error Codes (For future use) 41 | 42 | ## 43 | NULL = #ПРАЗНО! 44 | DIV0 = #ДЕЛ/0! 45 | VALUE = #СТОЙНОСТ! 46 | REF = #РЕФ! 47 | NAME = #ИМЕ? 48 | NUM = #ЧИСЛО! 49 | NA = #Н/Д 50 | -------------------------------------------------------------------------------- /PHPExcel/locale/cs/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = Kč 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #HODNOTA! 44 | REF = #REF! 45 | NAME = #NÁZEV? 46 | NUM = #NUM! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/da/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | 39 | ## 40 | ## Excel Error Codes (For future use) 41 | ## 42 | NULL = #NUL! 43 | DIV0 = #DIVISION/0! 44 | VALUE = #VÆRDI! 45 | REF = #REFERENCE! 46 | NAME = #NAVN? 47 | NUM = #NUM! 48 | NA = #I/T 49 | -------------------------------------------------------------------------------- /PHPExcel/locale/de/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #WERT! 44 | REF = #BEZUG! 45 | NAME = #NAME? 46 | NUM = #ZAHL! 47 | NA = #NV 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/en/uk/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ## 30 | ## (For future use) 31 | ## 32 | currencySymbol = £ 33 | -------------------------------------------------------------------------------- /PHPExcel/locale/es/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rather than € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #¡NULO! 42 | DIV0 = #¡DIV/0! 43 | VALUE = #¡VALOR! 44 | REF = #¡REF! 45 | NAME = #¿NOMBRE? 46 | NUM = #¡NÚM! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/fi/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = $ # Symbol not known, should it be a € (Euro)? 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #TYHJÄ! 42 | DIV0 = #JAKO/0! 43 | VALUE = #ARVO! 44 | REF = #VIITTAUS! 45 | NAME = #NIMI? 46 | NUM = #LUKU! 47 | NA = #PUUTTUU 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/fr/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NUL! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALEUR! 44 | REF = #REF! 45 | NAME = #NOM? 46 | NUM = #NOMBRE! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/hu/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = Ft 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULLA! 42 | DIV0 = #ZÉRÓOSZTÓ! 43 | VALUE = #ÉRTÉK! 44 | REF = #HIV! 45 | NAME = #NÉV? 46 | NUM = #SZÁM! 47 | NA = #HIÁNYZIK 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/it/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULLO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALORE! 44 | REF = #RIF! 45 | NAME = #NOME? 46 | NUM = #NUM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/nl/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #LEEG! 42 | DIV0 = #DEEL/0! 43 | VALUE = #WAARDE! 44 | REF = #VERW! 45 | NAME = #NAAM? 46 | NUM = #GETAL! 47 | NA = #N/B 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/no/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #VERDI! 44 | REF = #REF! 45 | NAME = #NAVN? 46 | NUM = #NUM! 47 | NA = #I/T 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/pl/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = zł 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #ZERO! 42 | DIV0 = #DZIEL/0! 43 | VALUE = #ARG! 44 | REF = #ADR! 45 | NAME = #NAZWA? 46 | NUM = #LICZBA! 47 | NA = #N/D! 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/pt/br/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = R$ 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALOR! 44 | REF = #REF! 45 | NAME = #NOME? 46 | NUM = #NÚM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/pt/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALOR! 44 | REF = #REF! 45 | NAME = #NOME? 46 | NUM = #NÚM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/ru/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = р 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #ПУСТО! 42 | DIV0 = #ДЕЛ/0! 43 | VALUE = #ЗНАЧ! 44 | REF = #ССЫЛ! 45 | NAME = #ИМЯ? 46 | NUM = #ЧИСЛО! 47 | NA = #Н/Д 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/sv/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #Skärning! 42 | DIV0 = #Division/0! 43 | VALUE = #Värdefel! 44 | REF = #Referens! 45 | NAME = #Namn? 46 | NUM = #Ogiltigt! 47 | NA = #Saknas! 48 | -------------------------------------------------------------------------------- /PHPExcel/locale/tr/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version ##VERSION##, ##DATE## 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = YTL 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #BOŞ! 42 | DIV0 = #SAYI/0! 43 | VALUE = #DEĞER! 44 | REF = #BAŞV! 45 | NAME = #AD? 46 | NUM = #SAYI! 47 | NA = #YOK 48 | -------------------------------------------------------------------------------- /export.php: -------------------------------------------------------------------------------- 1 | Data Exported Successfully!"; 28 | 29 | $objPHPExcel = new PHPExcel(); 30 | $objPHPExcel->setActiveSheetIndex(0); 31 | $rowCount = 1; 32 | //setting column headings 33 | $objPHPExcel->getActiveSheet()->SetCellValue('A'.$rowCount,"Name"); 34 | $objPHPExcel->getActiveSheet()->SetCellValue('B'.$rowCount,"E-mail"); 35 | $rowCount++; 36 | //Adding Data to Sheet 37 | while($row = mysqli_fetch_array($result)) 38 | { 39 | $objPHPExcel->getActiveSheet()->SetCellValue('A'.$rowCount, $row['name']); 40 | $objPHPExcel->getActiveSheet()->SetCellValue('B'.$rowCount, $row['email']); 41 | $rowCount++; 42 | } 43 | $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); 44 | $file= "downloads/".time()."myData.xlsx"; 45 | $objWriter->save($file); 46 | $fileDownload = ""; 47 | } 48 | else{ 49 | $fileExportMsg = ""; 50 | } 51 | } 52 | ?> 53 | 54 | 55 | 56 | PHP Excel Exporter 57 | 58 | 59 | 60 | 61 | 81 | 82 | 83 |
84 |
85 |
86 |

Excel to Mysql Exporter


87 |
88 |
89 | 90 |
91 |
92 |
93 |
94 | 95 |
96 |
97 | tbl_excel
98 |
99 |
100 | 101 |
102 |
103 |
104 |
105 |
106 | "; 109 | echo @$fileDownload; 110 | echo "
111 |

* Supported Formats: .xls | .xlsx | .csv

112 |

Importer →

"; 113 | ?> 114 |
115 | 116 | -------------------------------------------------------------------------------- /img/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravjha8298/Excel-to-MySQL-Importer-and-Exporter-in-PHP-using-PHPExcel/eba5434e49fb087d07689a845814182326be9c84/img/excel.png -------------------------------------------------------------------------------- /samplesheet.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gauravjha8298/Excel-to-MySQL-Importer-and-Exporter-in-PHP-using-PHPExcel/eba5434e49fb087d07689a845814182326be9c84/samplesheet.xls -------------------------------------------------------------------------------- /sql.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE IF NOT EXISTS `test` /*!40100 DEFAULT CHARACTER SET latin1 */; 2 | USE `test`; 3 | -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) 4 | -- 5 | -- Host: localhost Database: test 6 | -- ------------------------------------------------------ 7 | -- Server version 5.5.5-10.1.16-MariaDB 8 | 9 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 10 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 11 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 12 | /*!40101 SET NAMES utf8 */; 13 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 14 | /*!40103 SET TIME_ZONE='+00:00' */; 15 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 16 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 17 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 18 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 19 | 20 | -- 21 | -- Table structure for table `tbl_excel` 22 | -- 23 | 24 | DROP TABLE IF EXISTS `tbl_excel`; 25 | /*!40101 SET @saved_cs_client = @@character_set_client */; 26 | /*!40101 SET character_set_client = utf8 */; 27 | CREATE TABLE `tbl_excel` ( 28 | `excel_id` int(11) NOT NULL AUTO_INCREMENT, 29 | `excel_name` varchar(250) NOT NULL, 30 | `excel_email` varchar(300) NOT NULL, 31 | PRIMARY KEY (`excel_id`) 32 | ) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=latin1; 33 | /*!40101 SET character_set_client = @saved_cs_client */; 34 | 35 | -- 36 | -- Dumping data for table `tbl_excel` 37 | -- 38 | 39 | LOCK TABLES `tbl_excel` WRITE; 40 | /*!40000 ALTER TABLE `tbl_excel` DISABLE KEYS */; 41 | /*!40000 ALTER TABLE `tbl_excel` ENABLE KEYS */; 42 | UNLOCK TABLES; 43 | 44 | -- 45 | -- Dumping events for database 'test' 46 | -- 47 | 48 | -- 49 | -- Dumping routines for database 'test' 50 | -- 51 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 52 | 53 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 54 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 55 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 56 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 57 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 58 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 59 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 60 | 61 | -- Dump completed on 2018-06-02 13:06:30 62 | --------------------------------------------------------------------------------