Commit Graph

570 Commits

Author SHA1 Message Date
Adrien Crivelli 6e2447d933
`setStrikethrough()` did not set the font
Fixes #403
2018-03-04 21:39:32 +01:00
Tony Brix bdc95b14bf
Select correct cell when calling freezePane
Fixes a bug when calling `$sheet->freezePane('B2')` without a second argument.
The selected cell will now be `B2` instead of the incorrect `B3`.

Fixes #389
Closes #393
2018-03-03 16:48:30 +01:00
Josh Grant a089a87671
Avoid losing calculated value type
Closes #394
2018-03-03 11:51:06 +01:00
Josh Grant 148bee1991
Support `_xlfn.` prefix and add `ISFORMULA`, `MODE.SNGL`, `STDEV.S`, `STDEV.P`
This change adds support for newer functions that are prefixed
by _xlfn. (#356). The calculation engine has been updated to
recognise these as functions, and drop the _xlfn. part.

It also add a couple of the new functions such as STDEV.S/P,
MODE.SNGL, ISFORMULA.

Fixes #356
Closes #390
2018-02-26 09:35:53 +01:00
Adrien Crivelli 1adc3a6688
Read printing area correctly when skipping some sheets
Fixes #371
2018-02-25 19:40:11 +01:00
Adrien Crivelli f58724ae0b
Fix code style 2018-02-25 13:58:42 +01:00
luciferfran ae1ec5f2cf
Use proper € symbol for currency format
This also place the symbol after the figure as it is by far the most
common usage according to https://en.wikipedia.org/wiki/Language_and_the_euro#Summary

Closes #379
2018-02-25 13:51:47 +01:00
Paul Klimov eb612157dd array short syntax in documentaiton (#373) 2018-02-25 13:16:04 +01:00
Claudio Zizza 0084776160 Remove Scrutinizer failure condition
Previous commits introduced failure conditions in Scrutinizer,
which dropped the index of Xlsx reader drasticly.
2018-02-20 17:35:30 +09:00
Adrien Crivelli 349e4452e7
Fix a few docblocks 2018-02-12 12:09:35 +09:00
Jan-Sverre Riksfjord 2e37578971
Fix zoom scale problems on reading bad xlsx files
Some computer programs will output xlsx files that do not compare 100%
to the standards. Excel will open the file without any problem.

setZoomScaleNormal() should throw exception when manually setting the
scale to less than or equals 0, but when reading files, we should
be able to read a file with such error, as Excel does.

Closes #350
2018-02-11 14:50:07 +09:00
Chris Wild 608a2edba7
HTML writer creates a generator meta tag
Fixes #312
Closes #362
2018-02-11 14:34:38 +09:00
Toha 38b90715e2 Fix formula string truncated at the end.
Wrong use of substr() in commit 453f8f1821 makes
formula string truncated at the end.

Signed-off-by: Toha <tohenk@yahoo.com>
2018-02-08 12:45:41 +09:00
Adrien Crivelli 02e176197a
Code style 2018-02-05 21:48:47 +09:00
Adrien Crivelli e31878ceb1
Check for MIME type to know if CSV reader can read a file
CSV reader used to accept any file without any kind of check. That made
users incorrectly believe that things were ok, even though there is no
way for CSV reader to read anything else that plain text files.

Fixes #167
2018-02-05 21:33:23 +09:00
Adrien Crivelli de7758f9b6
Avoid potentially unsupported PSR-16 cache keys
Ensure compatibility with all PSR-16 cache implementation by using
a stricter character set for cache key that match the spec.

Fixes #354
2018-02-01 21:27:36 +09:00
Adrien Crivelli d2f55ffa07
Support PHP 7.2 2018-01-28 16:23:38 +09:00
Adrien Crivelli c96e2dae02
Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
Adrien Crivelli 015c83ccf4
Fix a few docblocks 2018-01-28 15:26:42 +09:00
MaxTingle 49775bd972
Fix cell ranges causing coordinate merge error
Fixes #319
Closes #328
2018-01-22 12:26:37 +09:00
Michael Bollman 4e0344c3af
Use line width for data series when rendering Xlsx
Closes #329
2018-01-22 11:50:53 +09:00
Gabriel Caruso 257c3eca58 Simplify returns 2018-01-17 12:42:54 +09:00
Adrien Crivelli 481fc4a7c6
Support XML file without styles
Closes #331
Closes https://github.com/PHPOffice/PHPExcel/pull/559
Fixes https://github.com/PHPOffice/PHPExcel/issues/558
2018-01-14 17:08:50 +09:00
Adrien Crivelli bf2dbbaf10
COLUMNS and ROWS functions crashed in some cases
Fixes #336
Fixes https://github.com/PHPOffice/PHPExcel/issues/1383
2018-01-13 18:01:50 +09:00
Adrien Crivelli 4635d39b4a
PHP 7.2 compatibility 2018-01-09 14:26:59 +09:00
Adrien Crivelli 25bc54f9eb
Freeze Panes takes wrong coordinates for XLSX
Fixes #322
2018-01-09 00:42:30 +09:00
Steffen Breiler 653adf8e10
Adding option to stop at a conditional styling, if it matches
This would be used like `$conditonal->setStopIfTrue()` and is only supported
for XLSX format for now.

Closes #292
2018-01-07 22:45:51 +09:00
Christoph "criztovyl" Schulz cdbf3347cb
Support for cell comments in HTML writer and reader
The behavior is similar to what is done in LibreOffice. That means if there is a
comment it will be shown with a small indicator and the actual comment will be
revealed when mouse hover over the indicator.

Fixes #308
Closes #310
2018-01-07 21:51:48 +09:00
Adrien Crivelli 98e0a97139
Typo in documentation
Closes #315
2018-01-04 13:34:25 +09:00
Adrien Crivelli a504a39474
Fix PHPDoc blocks
Closes #314
2018-01-04 02:02:41 +09:00
Adrien Crivelli ca6114639a
Support for shape style ending with `;`
Valid CSS style can end with `;` and that is the case for some 3rd party
software such as WPS Office.

Closes #304
2017-12-28 12:36:57 +09:00
Adrien Crivelli 139d85d874
Better auto-detection of CSV separators
Closes #305
2017-12-28 12:25:37 +09:00
Adrien Crivelli ac1c7a2c7d
Fix a few phpdoc blocks 2017-12-27 22:20:47 +09:00
Adrien Crivelli fff3630780
Support migration of prefixed classes 2017-12-25 10:49:14 +09:00
Adrien Crivelli fb5f8d4763
Support DateTimeImmutable as cell value 2017-12-23 21:50:07 +09:00
Adrien Crivelli 1dfd4dbeb9
Date format compatible with both LibreOffice and Excel
Date formats used invalid single `y`, instead of double `yy`.
That was was implicitly fixed and displayed correctly by Excel. But
LibreOffice does not implicitly fix it and instead display the literal `y`
instead of th year value.

See also: https://support.office.com/en-us/article/Format-numbers-as-dates-or-times-418bd3fe-0577-47c8-8caa-b4d30c528309

Fixes #298
2017-12-23 18:28:56 +09:00
Adrien Crivelli d9bd45f4f1
Fix unit tests 2017-12-23 14:59:23 +09:00
Adrien Crivelli 80e46707aa
Fix code style 2017-12-23 14:40:51 +09:00
Alessandro Lai 453f8f1821
Simplify substr usages 2017-12-23 14:37:04 +09:00
Alessandro Lai 30ec11c7fa
Optimize regex using \d 2017-12-23 14:36:08 +09:00
Alessandro Lai cfc325ab57
Fix PHPDoc to avoid erroneous warning in IDE 2017-12-23 14:35:13 +09:00
Alessandro Lai 5bdb3ba210
Simplify return statement 2017-12-23 14:34:49 +09:00
Alessandro Lai b77352f153
Add regex delimiter for proper escaping 2017-12-23 14:33:50 +09:00
Alessandro Lai b5057f44b1
Avoid race condition 2017-12-23 14:32:27 +09:00
Alessandro Lai a653e09bf0
Remove duplicated code and call parent methods where possible 2017-12-23 14:28:28 +09:00
Alessandro Lai f246ad731d
Remove redundant function calls in for loops 2017-12-23 14:22:21 +09:00
Adrien Cohen 11b055b29f
Able to set the `topLeftCell` in freeze panes
Fixes #260
Closes #261
2017-12-17 13:32:16 +09:00
Adrien Crivelli eb58563b4b
Written DataValidation was corrupted
Fixes #290
2017-12-16 17:15:13 +09:00
Adrien Crivelli a204e0c7ec
Constant `TYPE_DOUGHTNUTCHART` is now `TYPE_DOUGHNUTCHART` 2017-12-13 19:54:25 +09:00
Adrien Crivelli 96f3f666d6
Support to write merged cells in ODS format
Fixes #287
2017-12-11 12:17:40 +09:00
Adrien Crivelli 962367c95f
Can read very small HTML files
Fixes #194
2017-12-11 11:09:25 +09:00
Adrien Crivelli 812a468844
New method `evaluateGCD()` should stay private 2017-12-03 17:20:45 +09:00
MarkBaker 90366f9dd1 style fixes 2017-11-26 23:18:11 +00:00
MarkBaker 19fd27811d Improved GCD() evaluation and additional tests 2017-11-26 22:13:29 +00:00
Adrien Crivelli 8d76020590
Consistent `stringFromColumnIndex()` and `columnIndexFromString()`
Column indexes are always based on 1 everywhere in PhpSpreadsheet.
This is consistent with rows starting at 1, as well as Excel
function `COLUMN()`. It should also make it easier to reason about
columns and rows and remove any doubts whether a specific method is
expecting 0 based or 1 based indexes.

Fixes #273
Fixes https://github.com/PHPOffice/PHPExcel/issues/307
Fixes https://github.com/PHPOffice/PHPExcel/issues/476
2017-11-26 15:29:08 +09:00
Adrien Crivelli e0150fd43e
Extract coordinate methods to `Coordinate` class 2017-11-18 23:52:38 +09:00
Maxim Bulygin 442e612202
Support custom PDF library instances or configurations
This allow to create and configure the standard instance of the
external PDF libary, before returning it to the standard writer.

Or, more powerful, this allow to provide a custom implementation
of the external PDF library, allowing for custom behaviors. An
example of that would something like: https://tcpdf.org/examples/example_003/

Closes #266
2017-11-04 16:01:09 +09:00
anton-harvey f7518dadc9
Return false if the zip entry could not be located
Previously the function did not check whether the return value of `ZipArchive::locateName`
was `false`. And when it was, it was passed straight into `ZipArchive::getFromIndex`,
which casts it to an integer, resulting in it incorrectly retrieving the entry at index `0`.

Fixes #262
Closes #268
2017-11-02 15:42:45 +09:00
Adrien Crivelli 8183c71e78
Remove duplicated declarations of interface implementation 2017-10-31 19:58:46 +09:00
Maxim Bulygin 6561494e32
Add possibility to check validity of a cell value, based on data validation rules
`$cell->hasValidValue()` returns true if the cell has a value which conform to the
rules defined in `$cell->getDataValidation()`.

Closes #257
2017-10-31 14:07:24 +09:00
Adrien Crivelli 8d23bda3dd
Fix Scrutinizer issues 2017-10-29 23:34:00 +09:00
Adrien Crivelli 557e80dc03
Rename classes to keep them in their related namespaces 2017-10-29 17:39:42 +09:00
Adrien Crivelli 3982ce2944
Remove unused variables and parameters 2017-10-29 14:09:38 +09:00
Adrien Crivelli 782b4e4fae
Upgrade chart rendering support to be composer based
This allow to get rid of manual class loading and have simpler
usage of the library.
2017-10-29 01:58:42 +09:00
Adrien Crivelli b4a187bef8
Fix missing classes 2017-10-28 22:52:23 +09:00
Adrien Crivelli a093a468d1
HLOOKUP check on the count of the rows, not columns
We must check on the count of the rows (`row_index_num` and not
`col_index_num` as in VLOOKUP) and not on the columns.

https://support.office.com/en-us/article/HLOOKUP-function-a3034eec-b719-4ba3-bb65-e1ad662ed95f

Fixes https://github.com/PHPOffice/PHPExcel/issues/1339
2017-10-26 23:02:53 +09:00
Adrien Crivelli 25ff914aa6
Simplify IOFactory to rely on autoloading 2017-10-22 01:54:14 +09:00
Adrien Crivelli 3e6a419b6d
Remove useless `@static` annotations 2017-10-21 23:26:05 +09:00
Adrien Crivelli 79ab852bf5
Expose PDF writer to be used directly
We used to have some kind of wrapper that didn't do much except
forward methods to the real instance. That unnecessary complexity
made it harder to work with the real writer instance.
2017-10-14 14:57:44 +09:00
KacerCZ 98cd5e07bf Temporary directory is passed to mPDF (#248)
Temporary directory set to PDF writer is passed to mPDF object in constructor.
mPDF 7.0 changed temporary directory configuration from constant to constructor parameter.
Without this change it is not possible to change default temporary directory.

See: https://mpdf.github.io/installation-setup/folders-for-temporary-files.html
2017-10-13 16:08:55 +09:00
Adrien Crivelli add064e80e
Migrate `Shared\Date` methods
Closes #247
2017-10-13 12:12:58 +09:00
Adrien Crivelli b14234b198
Removed leading slashes from migrator map
Closes #245
Closes #246
2017-10-13 10:38:58 +09:00
Adrien Crivelli bd3285b4fa
Avoid underscore in property names 2017-10-08 14:37:11 +09:00
Claudio Zizza c9795e13b5 Add missing class properties (#241) 2017-10-08 13:18:39 +09:00
Adrien Crivelli 483f3c98ff
More fixes from PhpStorm warnings 2017-10-08 02:00:30 +09:00
Adrien Crivelli 1259549466
Drop unused code and fix some PhpStorm warnings 2017-10-08 01:21:32 +09:00
Maxim 4b4bac53aa INDEX(): fix getting row and col numbers from references (#239)
Allow to use cell references as row and column in function INDEX(). Eg:

```
=INDEX(A1:B5, A9)
```
2017-10-06 14:01:20 +09:00
Maxim 088a76737e Fix DAY() function with 0<x<1 input (#230)
Also bring support for OpenOffice DATE() calculation method
2017-10-04 12:57:01 +09:00
Adrien Crivelli 440bfe637f
Don't use short list syntax to keep PHP 5.6 compatibility 2017-10-01 21:50:40 +09:00
Adrien Crivelli 4fd8e742e7
Upgrade to PHP-CS-Fixer 2.7 2017-10-01 20:07:04 +09:00
Adrien Crivelli 50a0ec58af
Merge all examples together
Closes #17
2017-10-01 17:48:59 +09:00
Adrien Crivelli 29208e9d99
Remove boilerplates
Because it is a budren to maintain and LGPL 2.1 does not require
them, but only suggest them:

> To apply these terms, attach the following notices to the library.
> It is **safest** to attach them to the start of each source file
> to most effectively convey the exclusion of warranty; and each
> file **should** have at least the "copyright" line and a pointer
> to where the full notice is found.

https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html#SEC4
2017-09-30 22:12:28 +09:00
Maxim 810f174d6e Fix INDEX() function when rows count less than row number (#233) 2017-09-30 12:13:20 +09:00
Adrien Crivelli 360db8dbcd
Upgrade to mPDF 7.0+
Closes #144
2017-09-29 11:17:08 +09:00
GreatHumorist 2abe56b946 Support missing attribute `r` in `c` node when reading xlsx
When describing a cell, the cell reference (r="A1") is optional.
When not present, we should just increment the index of the last processed row.

Fixes #201 
Closes #225
2017-09-22 14:49:38 +09:00
GreatHumorist 7aa6233185
Added xml reader hyperlink support
Closes #223
2017-09-22 14:40:47 +09:00
GreatHumorist 0477e6fcfe In Xml reader throw exception in case of invalid XML (#222)
When the xml file is not a standard xml file, the `simplexml_load_string` will return false, this will cause an error on "$xml->getNamespaces(true);" . So instead of showing the error, we throw an exception.
2017-09-20 14:20:12 +09:00
Adrien Crivelli febbe87172
Remove unused variable 2017-09-12 01:06:48 +09:00
all-lala 81c1b14048
Re-use original palette color when possible
This is to prevent color changing when copy/pasting xls files written by
PhpSpreadsheet to another file.

Closes #218
2017-09-11 14:28:49 +09:00
Adrien Crivelli 097d349e9c
Fix code style 2017-09-11 13:41:44 +09:00
MarkBaker 77b3c12fbc More perforan version of stringFromColumnIndex that takes advantage of the PHP 5.3 modified ternary 2017-09-10 22:51:05 +01:00
MarkBaker d576855031 Merge branch 'develop' of https://github.com/PHPOffice/PhpSpreadsheet into develop 2017-09-10 22:27:50 +01:00
Adrien Crivelli 1cf119dd0b
Escape control characters in cell values
Control characters in cell values are automatically escaped without
the need to excplicitly call `StringHelper::buildCharacterSets()` beforehand.

Fixes #212
2017-09-09 19:29:08 +09:00
Adrien Crivelli e558028eb7
Remove extraneous parameter 2017-09-09 18:23:07 +09:00
Davis Devasia 41a1aa9ede Uncommented the increment of $imageCounter (#205)
The static variable $imageCounter previously had a constant value of 0 throughout the program as it was never being modified, because it was commented out by mistake.

Now it increments every time a new drawing is being instantiated.

This also fixed a problem when multiple images of same name in the same worksheet are incorrectly displayed.

Fixes #204
Closes #205
2017-09-08 20:43:12 +02:00
Adrien Cohen 5dd18586a2
Fix colIndex read as signed int16 for relative ref
As described in http://interoperability.blob.core.windows.net/files/MS-XLS/[MS-XLS].pdf
a relative column reference can be between -255 +255 and not -127 + 127, the column
index should be read as a signed int16.

References:

- 2.2.2.2.1 Value Class / page 81
- 2.5.198.88 PtgRefN / page 815
- 2.5.198.111 RgceLocRel / page 828

Fixes #211
Closes #214
2017-09-09 03:34:52 +09:00
Adrien Crivelli 1c5db4e170
Standardize keys used for styling
Array keys used for styling have been standardized for a more coherent experience.
It now uses the same wording and casing as the getter and setter methods.

Closes #189
2017-09-09 02:56:23 +09:00
CrazyBite e6c95bf9b0
Added fillColor for chart plot series
For now it is only to write to Xlsx

Closes #158
2017-09-08 02:52:27 +09:00
Bill Blume 2761773b3d
Merge data-validation collections to reduce the final file size
Closes #131
Closes #193
2017-09-08 02:27:18 +09:00
Vladimir Reznichenko 004a192922 SCA with Php Inspections (EA Extended)
Closes #208
2017-09-07 19:11:48 +02:00
Adrien Crivelli c8089f97d8
Prevent notice when no rules
Closes https://github.com/PHPOffice/PHPExcel/pull/1287
2017-08-17 12:55:27 +02:00
Adrien Crivelli cf2c0e51f4
Fix variadic docblocks 2017-08-03 12:59:52 +02:00
Adrien Crivelli 4a47a32953
Code style partially according to Scrutinizer 2017-08-03 12:03:24 +02:00
Adrien Crivelli 5520bf5c99
Fix wrong return type
Closes https://github.com/PHPOffice/PHPExcel/pull/1262
2017-07-30 21:29:37 +02:00
Ben 0b03571394 removed wrong parameter hint (#187) 2017-07-17 16:07:17 +02:00
Mikkel Paulson 1853aaac79 Add option to suppress validation of sheet titles (#186)
Add option to suppress validation of sheet titles

Based on a "lowest common denominator" approach to compatibility,
we will continue to enforce a 31-character limit for sheet titles.
However, this limit should not be enforced when loading an existing
file.

Added a new optional parameter to Worksheet::setTitle() and
Worksheet::setCodeName() to suppress validation and massaging,
based on the premise that existing files should be given a
best-effort approach to loading and parsing. Unfortunately, it's
not possible with the current architecture to prevent users from
making use of this functionality, aside from with a strongly-worded
warning.

Added test coverage. I didn't see any existing unit tests of the
Worksheet class, so I created a new test to cover these methods.

Fixes #176
2017-07-14 10:53:13 +02:00
Kifni Taufik Darmawan 2a6ab1776c
HTML reader supports text and background color from inline CSS, for `td` and `th` element
Closes #180
2017-06-23 11:28:17 +02:00
Mewes Kochheim 6aae764920
Use default values when writing validation in Xls
Fixes the PHP 7.1 bug reported over at PHPOffice/PHPExcel#1110
The behavior should not change since the default value used should behave the same way as the string value in earlier PHP versions.

Fixes a return type in the doc block of IReader.

Closes #165
2017-06-20 10:48:45 +02:00
Adrien Crivelli 44e2461b7b
Refactor `define()` as class constants
This will improve interoperability with other projects and simplify our code.

Closes #157
2017-05-19 23:49:12 +02:00
Zharikov Viktor 07455d24f6
Make global usage of `use` instead of FQCN
Closes #78
Closes #147
2017-05-18 00:10:16 +02:00
azine.me 77199c9877
Ods writer repects PreCalculateFormulas flag
The OpenDocument Writer did not respect the "preCalculateFormulas" flag that
can be set to speed up saving process, now it does.

Closes #142
2017-05-07 17:07:27 +02:00
MarkBaker 4ccd0b95da Merge branch 'develop' of https://github.com/PHPOffice/PhpSpreadsheet into develop 2017-05-04 14:31:40 +01:00
Adrien Crivelli 870d8640f5
Enforce writer parts parent to be concrete writer
We used to type hint against IWriter for writer part parent, but this
was not respected in writer part who often coded against the implementation
instead of the interface. With this change we make it a requirement for
writer parts to use their respective writer implementation instead of an
interface. This give legitimate access to all `BaseWriter` methods amongst
other things.
2017-04-21 14:46:17 +09:00
Markus Lanthaler 3ee9cc5ce6
Infer CSV delimiter if it hasn't been set explicitly
Closes #141
2017-04-20 17:02:03 +09:00
Adrien Crivelli 0bd3a9c60a
HHVM compatibility fix 2017-04-16 16:20:33 +09:00
Adrien Crivelli 75d3bdb016
Declare arguments as required when they are
Closes #110
2017-04-16 14:25:28 +09:00
Adrien Crivelli 06ca8f9b04
Leverage type hinting to assert array parameters 2017-04-16 14:25:28 +09:00
Adrien Crivelli 033a4bdad5
Remove default values for function that should not have any default
Having default values made it harder for end-user to figure out whether
it the arguement had to be supplied or not. Ommitting the argument may
lead to hard to debug issues, and is overall not a good idea.

Closes #110
2017-04-16 14:25:28 +09:00
Ivan Bragin 67581a0dd5 Fallback from iconv to mbstring for encoding convertion
In some exotic environnement (IBM AIX) it may happens that `//TRANSLIT` is not supported. In that case iconv would return false. We can easily identify the case and fallback on mbstring instead. That should give correct result.

Closes #135
Closes #136
2017-04-14 20:54:37 +09:00
simivar 8fd1825d39 Throw exception in XLS with columns or rows overflow (#138)
This is a hard limit of the BIFF format that cannot be worked around,
so it is best to throw exceptions than silently discard data or generate
corrupted files.
2017-04-14 20:45:53 +09:00
Adrien Crivelli fd9c925a7b
Refactor CachedObjectStorage to PSR-16
This drop a lot of non-core features code and delegate their maintainance
to third parties. Also it open the door to any missing implementation
out of the box, such as Redis for the moment.

Finally this consistently enforce a constraint where there can be one and
only one active cell at any point in time in code. This used to be true for
non-default implementation of cache, but it was not true for default
implementation where all cells were kept in-memory and thus were never
detached from their worksheet and thus were all kept functionnal at any
point in time.

This inconsistency of behavior between in-memory and off-memory could
lead to bugs when changing cache system if the end-user code was badly
written. Now end-user will never be able to write buggy code in the first
place, avoiding future headache when introducing caching.

Closes #3
2017-04-14 16:56:27 +09:00
Adrien Crivelli c2b38b0ee0
Error style of data validation was incorrectly written to Xls
We use to write the wrong property to file, leading to a warning
in PHP 7.1 since the `switch` never matched anything and the variable
was left as a string instead of as an int.

Closes https://github.com/PHPOffice/PHPExcel/issues/1110
2017-04-12 12:40:28 +09:00
Kurounin b01671213a
Removed double un-escaping when reading CSV
Removed "unescape enclosure functionality", since the unescaping is already handled by fgetcsv,
and performing the unescaping again would actually result int the text from the cell being read wrong.

As an example try parsing the folowing CSV:

```
"<img alt="""" src=""http://example.com/image.jpg"" />"
```

With the additional unescaping it would have ended up as:

```
<img alt=" src="http://example.com/image.jpg" />
```

instead of the correct:
```
<img alt="" src="http://example.com/image.jpg" />
```

Fixes https://github.com/PHPOffice/PHPExcel/pull/1171
2017-04-03 11:57:10 +09:00
Paolo Agostinetto fd83c191ea MATCH function behavior when third parameter is equal to 1 or -1
Fixes #51 
Closes #122
2017-04-01 12:36:02 +09:00
Galkin Ivan 7fd5eefe04 Add empty cell condition for conditional formatting (#128) 2017-04-01 12:12:31 +09:00
MarkBaker 08ced34dfd SUBTOTAL options for ignoring hidden cells 2017-03-19 14:17:20 +00:00
Paolo Agostinetto 9767112b23 Settings: deleted libxml_disable_entity_loader() calls (#113)
Settings: deleted libxml_disable_entity_loader() calls since they're not necessary.
Prevent setLibXmlLoaderOptions() and getLibXmlLoaderOptions() to call the libxml_disable_entity_loader() function which alter the global state of libxml.
See the discussion here https://github.com/PHPOffice/PhpSpreadsheet/issues/74
2017-03-12 22:00:46 +09:00
Adrien Crivelli b669d48f2f
Un-deprecate `getCalculatedValue()`
Those were deprecated a long time ago in 59932b0cac
but their replacement seems to have never been added. 5 years later the
best solution is to un-deprecate them and if someday their replacement are
actually added, then we can re-deprecate them properly.

Closes #22
2017-03-11 12:16:07 +09:00
Adrien Crivelli ea5663bc00
Drop support for PclZip
Over the years PclZip became a maintenance problem. It's code base
is old and the official project seems to have died out. ZipArchive
is now more commonly available and offer an easier and more complete
API. So PclZip was dropped in order to focus our efforts on what matters.

Closes #18
2017-03-11 11:48:46 +09:00
ankitm123 f99eb8dbba Cloned worksheet updates were reflected on original (MemoryDrawing)
We need to make note of two things:

- The old code was trying to clone an objectArray, and hence was performing a shallow copy of memoryDrawing objects (the __clone magic function was not getting invoked).
Instead, if one loops over the objectArray, and then clones the individual memory drawing objects, then the __clone function for the MemoryDrawing object is invoked.

- The __clone function for memory drawing was using the clone keyword which does not deal with circular references (Since memoryDrawing object had references to worksheet object, it was encountering an infinite loop). However, serializing and unserializing objects deals with circular references pretty well. 

Fixes #92 
Closes #106
2017-03-06 22:58:19 +09:00
Adrien Crivelli 5fce89e76b Merge pull request #108 from redokun/fix-105
Ods writer: add support for basic text styling (Fix #105)
2017-03-06 11:39:50 +09:00
Christian Schmidt 3560f11935
Replace mbStrReplace() with str_replace()
By design, UTF-8 allows any byte-oriented substring searching algorithm,
since the sequence of bytes for a character cannot occur anywhere else
([source](https://en.wikipedia.org/wiki/UTF-8#Advantages_3)).

So `str_replace()` also works for UTF-8-encoded strings, assuming that
the input strings are valid UTF-8 strings. The previous implementation
of mbStrReplace() did nothing to detect invalid strings.

Also, `str_replace()` does not support [Unicode equivalence](https://en.wikipedia.org/wiki/Unicode_equivalence),
but nor do the other `mb_string` functions, and nor does `=SUBSTITUTE()` in Excel
(tested on Excel for Mac version 15.19.1, Excel 2016 for Windows and LibreOffice 5.1).

Closes #109
2017-03-06 11:33:06 +09:00
Paolo Agostinetto 93b5337bda Writer\Ods\Content: Fix CS 2017-03-04 17:18:18 +01:00
Paolo Agostinetto 4efda2a512 Ods\Writer\Content: added support for xr styles (bold, italic, font family, font size, underline, bg color) 2017-03-04 17:18:18 +01:00
Paolo Agostinetto e60897ae5f Writer\Ods\Content: all variable names to camelcase 2017-03-04 17:18:18 +01:00
Paolo Agostinetto 8600e63123 Writer\Ods\Content: added docblock and removed unnecessary method parameter 2017-03-04 17:18:18 +01:00
Paolo Agostinetto 13bf3d4361 Writer\Ods\Content: making use of the "use" statement rather than explicit namespaces 2017-03-04 17:18:18 +01:00
Adrien Crivelli 0d1ff5b95f
Better exception message for new Excel functions
Closes https://github.com/PHPOffice/PHPExcel/issues/1136
2017-02-28 10:50:22 +09:00
Adrien Crivelli f7e1aa3c41 Merge pull request #98 from redokun/fix-85
Ods reader: various fixes and unit tests added (bug #85)
2017-02-25 16:51:10 +09:00
ankitm123 5df662e1a3
PHP 7.1 compatibility
Closes #96
Closes #101
Closes #102
2017-02-25 16:35:37 +09:00
Mingc a1a03428e7 Decode comment text in xls reader (#99) (#100)
Previously, xls reader did not decode comment properly if they used UTF-8.

References:

* [The Microsoft Excel File Format](https://www.openoffice.org/sc/excelfileformat.pdf): From BIFF8 on, strings are always stored using UTF-16LE text encoding. The character array is a sequence of 16-bit values. Additionally it is possible to use a compressed format, which omits the high bytes of all characters, if they are all zero
* [Apache POI](http://grepcode.com/file/repo1.maven.org/maven2/org.apache.poi/poi/3.7/org/apache/poi/util/StringUtil.java#StringUtil.readUnicodeString%28org.apache.poi.util.LittleEndianInput%29): is16BitFlag
2017-02-23 11:42:52 +09:00
Paolo Agostinetto 529617c77d Fixed CS errors 2017-02-20 22:14:07 +01:00
Paolo Agostinetto f3c62b615e Merge remote-tracking branch 'upstream/develop' into fix-85 2017-02-20 21:13:03 +01:00
Paolo Agostinetto 9785f926c1 php-cs run: fixed code style for new/changed files 2017-02-20 21:05:25 +01:00
Paolo Agostinetto c954eddf57 Ods reader: fix sheet count and added a test for sheet names 2017-02-20 21:02:04 +01:00
Paolo Agostinetto b50ca6e27c Ods reader: added/fixed PHPDoc and classes without namespace 2017-02-20 21:00:42 +01:00
Paolo Agostinetto 4cf7beef31 Ods reader: few readability tweaks 2017-02-18 21:10:06 +01:00
Paolo Agostinetto 1667056515 IReadFilter interface: fixed docblocks 2017-02-18 21:02:33 +01:00
Paolo Agostinetto 6d6353c0f1 Ods reader: fix reading of cells with hyperlinks 2017-02-18 20:59:14 +01:00
Paolo Agostinetto e46c298fe1 Ods reader: method loadIntoExisting() now uses DOMDocument to parse content 2017-02-18 20:38:10 +01:00
Adrien Crivelli 7b90bb9394
Drop checks for mbstring existence
Since mbstring is now a hard dependency enforced by composer, it is
no longer necessary to check for its presence and implement fallbacks.
2017-02-16 11:56:22 +09:00
Adrien Crivelli 1a52e23f08
Remove obsolete math polyfills 2017-02-16 11:15:22 +09:00
Adrien Crivelli 4ae95e5f7c
Drop obsolete method check existence 2017-02-16 11:01:35 +09:00
Adrien Crivelli ce8ba1fa66
Drop obsolete PHP 5.2 specific code 2017-02-16 10:42:54 +09:00
Alex Milde 47d7260c43 Ignore images with missing data when reading xlsx
Ignore images with missing data when reading xlsx

Fixes #94, closes #95
2017-02-16 09:42:07 +09:00
Roland Häder 99e5a8e919
Use `isset()` instead of `in_array()` for increased performance and code simplification
Closes #82

Signed-off-by: Roland Häder <roland@mxchange.org>
2017-02-14 23:06:35 +09:00
Adrien Crivelli 6e247c30d9
Drop support for SQLite 2 because it does not exist in PHP 5.6+ anymore 2017-02-14 12:53:20 +09:00
Zharikov Viktor de5a04e4cb
Avoid adding an unnecessary extra cell at the end of table when writing to HTML
Fixes #91, and closes #84
2017-02-14 11:57:29 +09:00
Tony Brix 149f9e649b fill color will change startColor and endColor (#90) 2017-02-10 21:03:17 +09:00
Adrien Crivelli fe73b2d402
Drop PHPSPREADSHEET_ROOT constant 2017-01-23 15:35:10 +09:00
Adrien Crivelli 8dddf56c2e
Use proper syntax for variadic functions
This simplify code, increase readability and improve the function
signature for API users.
2017-01-23 15:01:20 +09:00
Adrien Crivelli 152d39bd42
Unalign docblock
Because alignment was all broken and becaues it doesn't improve much
the code readability, but potentially create more complicated diff, we
prefer to unlaign all docblocks.
2017-01-23 11:25:02 +09:00
Adrien Crivelli 031af1e9d2
Standardize writers and readers name to be the format most common extension in CamelCase 2017-01-22 17:39:23 +09:00
Adrien Crivelli 1cdc8531b8
Rename writer `PDF` to `Pdf` for consistency 2017-01-22 00:58:48 +09:00
Adrien Crivelli 035281f04c
Basic test covering of all PDF writers
Third party PDF libraries must now be installed via composer and naturally
via composer autoloading mechanism. Because of that it is not necessary
to specify their path on disk. The usage is simplified and it allows us
to include them in our unit tests.

This also means that from now on PhpSpreadsheet must use composer autoloader
mechanism. The internal autoloading implementation was dropped.
2017-01-22 00:49:44 +09:00
titanrat 66f37218c9 Fix mpdf writer to work with MPDF 6.1.3 (#76)
Fix old namespace. New writer tested with MPDF 6.1.3
2017-01-19 18:26:27 +09:00
Сергей Симонян 2aa7707826 Use `use` sections instead of fully qualified class names (#69) 2017-01-10 02:09:39 +09:00
Adrien Crivelli 1b0b609c30
Remove dead code 2017-01-05 12:29:30 +09:00
Adrien Crivelli ec928d393f
Fix indentation as suggested by Scrunitizer 2017-01-05 12:26:20 +09:00
Adrien Crivelli e9d03cc6d3
Apply Scrutinzer patches for spacing 2017-01-05 12:14:44 +09:00
Adrien Crivelli c8a69dfb54
Fix comment #65 2017-01-05 11:11:18 +09:00
Roland Häder 3723bb825b Added `Row::getWorksheet()` to expose row's bounded worksheet #59, #60 2017-01-05 11:05:49 +09:00
Christian Schmidt 61408fc691 Properly format non-integer font sizes (#66)
The OOXML spec defines the font sizes (the `sz` element) as a double, so the value needs to be wrapped in `PHPExcel_Shared_String::FormatNumber()` to avoid breaking in non-English locales.
2017-01-04 17:27:42 +09:00
Adrien Crivelli 0c75d64817
Remove unused variables 2016-12-26 14:36:47 +09:00
Adrien Crivelli 8ce610eb59
Use correct declared debugLog 2016-12-26 13:59:31 +09:00
Adrien Crivelli 56245d558e
Use `::class` notation as much as possible
```
               *             ,
                           _/^\_
                          <     >
         *                 /.-.\         *
                  *        `/&\`                   *
                          ,@.*;@,
                         /_o.I %_\    *
            *           (`'--:o(_@;
                       /`;--.,__ `')             *
                      ;@`o % O,*`'`&\
                *    (`'--)_@ ;o %'()\      *
                     /`;--._`''--._O'@;
                    /&*,()~o`;-.,_ `""`)
         *          /`,@ ;+& () o*`;-';\
                   (`""--.,_0 +% @' &()\
                   /-.,_    ``''--....-'`)  *
              *    /@%;o`:;'--,.__   __.'\
                  ;*,&(); @ % &^;~`"`o;@();         *
                  /(); o^~; & ().o@*&`;&%O\
            jgs   `"="==""==,,,.,="=="==="`
               __.----.(\-''#####---...___...-----._
             '`         \)_`"""""`
                     .--' ')
                   o(  )_-\
                     `"""` `
```
2016-12-26 13:21:12 +09:00
Roman Kravchuk a045a446d5 fix namespace for ReflectionObject class
PHP Fatal error:  Class 'PhpOffice\PhpSpreadsheet\Writer\ReflectionObject' not found in PhpSpreadsheet/src/PhpSpreadsheet/Writer/Ods.php on line 151
2016-12-26 12:27:40 +09:00
John Doe a39d71ec16
Fix attaching drawing for xls
FIX #53, #61
2016-12-26 12:20:59 +09:00
Adrien Crivelli af82e266c0
A few more manual code style fixes for phpcs 2016-12-23 00:08:55 +09:00
Adrien Crivelli 8c66afe39a
Upgrade to PHP-CS-Fixer 2.0 2016-12-22 23:46:26 +09:00
Adrien Crivelli 0de994c998
Fix `IMSQRT()` tests on PHP 7.1 2016-12-22 22:54:58 +09:00
MarkBaker 03f96ab6d8 GH-57 Bug fix in Border.php 2016-12-18 23:06:10 +00:00
Arthur-min a5c21a7b43 Exxcel 2003 XML working pattern property (#54) 2016-12-14 22:21:16 +09:00
Enyby 30a5e4b893
Fixed bug on load XML with column filter
`continue;` break columnID increment. Another problem can be on Merged cells.
2016-12-14 22:03:21 +09:00
DCoderLT 2484a03f19
Fix fatal error when `RichText` extract container cell's font
`RichText` tries to extract container cell's font via
`Cell->getParent()->getStyle(...)`, which crashes because
`getParent()` does not return a worksheet. Changing it to
`getWorksheet()` fixes the problem.
2016-12-14 21:56:57 +09:00
jacobsreynolds 720fb3eff5
Read background color of cells from HTML file
If a <td> in HTML has a bgcolor attribute, it is then applied to the spreadsheet file
2016-12-14 21:40:59 +09:00
Arthur Miniconi ab7aa68300
Excel2003 XML parse Interior Pattern property 2016-12-14 21:29:36 +09:00
golodnyi a6a709a4ba Not relevant parameters when calling functions 2016-12-09 12:33:41 +09:00
Adrien Crivelli c8a8fd2610
Stricter check whether file exists before reading
This should avoid issues when user submit a non-existing filename
that is wrongly identified as CSV.

Typically https://github.com/PHPOffice/PHPExcel/issues/1076 and
https://github.com/PHPOffice/PHPExcel/issues/1078 could have been
avoided.
2016-12-09 00:15:22 +09:00
golodnyi 5e03e282e5
Duplicate case in switch 2016-12-08 19:22:58 +09:00
mattkibbler 62345ef4da
Allow start and end date of DATEDIF function to be the same 2016-12-04 19:04:10 +09:00
Nikolay Ninkov a7155d8890
Partial localization of functions in Bulgarian 2016-12-04 18:48:21 +09:00
Adrien Crivelli 3bd0f6f985
Fix autofilter cloning across PHP versions
Avoid indirect access variable ambiguity across PHP 5.6 and PHP 7.0
2016-12-04 16:44:40 +09:00
Matthias Van Woensel 39b8dbd0a1
Adding float cast to MOD function
If $a or $b are not strings, you can get an error that fmod needs param 1 ($a) to be of type double.
MS Excel does not fall over when you insert an empty string in MOD, so I'm guessing PHPExcel should do the same?
2016-12-04 16:12:51 +09:00
Gemorroj 48a6e86adc
Added missing variables 2016-12-04 15:58:21 +09:00
Herman M. Hofman b964788d5c
FIX PHP Fatal Error on an invalid Blip Field.
For (still) unknown reasons, PHPExcel detects a wrong field type.
If there is no BSE Index, we will fail here and other fields are not read.
So if the BSE Index < 1, continue with the next field.
TODO: Why is there no BSE Index?
      Is this a new Office Version?
      Password protected field?
      More likely : a uncompatible picture

PHP Notice:  Undefined offset: -1 in Classes/PHPExcel/Reader/Excel5.php on line 1063
PHP Fatal error:  Call to a member function getBlipType() on a non-object in Classes/PHPExcel/Reader/Excel5.php on line 1064
2016-12-04 15:47:20 +09:00
josch1710 c1f5bdba5d
removeColumn doesn't remove all cells
removeColumn doesn't remove all cells, because CacheBase::deleteCacheData only unsets cell data if they are objects.
But cached cell data could be arrays.
I moved the unset from inside the if block (line 150 ff) to after the if block.
2016-12-04 15:33:47 +09:00
appelflap 3b4f54722f
Also check Library Path
LibraryName was being checked twice.
2016-12-04 15:28:50 +09:00
Adrien Crivelli 6d44884e19
Drop deprecated methods #22 2016-12-04 15:06:31 +09:00
Adrien Crivelli e6d8362fb2
Some functions were not callable because of wrong declaration 2016-12-03 14:51:04 +09:00
Adrien Crivelli 22b9a3f66f
Drop PHP version checked according to our new requirement of PHP 5.5 2016-12-03 11:35:04 +09:00
Adrien Crivelli 5b7d6cc524
Remove obsolete `##VERSION##` and `##DATE##` that are not managed by svn anymore 2016-12-03 11:31:35 +09:00
Adrien Crivelli 4b0d3c8c1c
Drop the old `\PHPExcel_Calculation_Functions::VERSION()`
This fucntion does not exist in Excel and it is non trivial to implement
without svn. Thus it was incorrect for many releases.
2016-12-03 11:19:22 +09:00
Adrien Crivelli 854f7e838d
Support `#N/A` values in charts
FIX #50
2016-12-03 10:49:03 +09:00
Adrien Crivelli 268fc1a4c4
Fix unit tests for PHP < 7.0 2016-11-28 01:58:10 +09:00
Adrien Crivelli 5ad6ced95c
Introduce a tool to migrate from PHPExcel to PhpSpreadsheet 2016-11-28 00:13:57 +09:00
Adrien Crivelli e6bbc4bd25
Convert all line ending to unix style 2016-11-27 15:45:15 +09:00
Adrien Crivelli f74fde155f
Remove non-obvious BaseReader's dependency
BaseReader called `isValidFormat` despite it doesn't require it to be
implemented. Instead we replaced `isValidFormat` by a proper implementation
of `canRead` in each classes. This also remove the semantic amibguity between
those two methods.

FIX #32
2016-11-27 14:29:25 +09:00
Green Wang 8c58385d6c
Fix cant get right format chinese date format error
modify preg expression in NumberFormat.php

[DBNum1][$-804]yyyy"年"m"月"d"日";@
[DBNum1][$-804]yyyy"年"m"月";@
[DBNum1][$-804]m"月"d"日";@

FIX #44
2016-11-27 13:39:45 +09:00
tomaszsita 939f24ecb4
Calculate column auto width for merged cells (if horizontal, 1-column wide merge only)
This is to fix the situation when cells merged vertically are ignored in columns auto size calculations.

I also removed $calculateMergeCells param as it wasn't used and I believe the only situation when you
want to calculate the width of merged columns has been covered here (and there's no reason to not calculate it).

FIX #46
2016-11-25 17:54:56 +09:00
Adrien Crivelli 6d8ba6f7f0
Revert references to classes in global namespace
Some references to classes were incorrectly assumed to be a reference
to self, whereas they were references to classes in global namespace
outside of this project.

FIX #37
2016-11-16 22:43:44 +09:00
Alexander Kurilo 1df5f97a5b Require GD for saving images in xls
GD is implicitly required for saving images anyway, this exception when
it's not loaded simply gives more information on what to do if the
execution flow reaches a places that depends on a function from GD.
2016-11-16 22:23:09 +09:00
Alexander Kurilo 408da0c17a Make HTML checks more strict 2016-11-16 22:21:30 +09:00
Roland Haeder 4b4831be07 Catch some invalid parameter (may come from damaged file) and throw exception. (#39)
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-11-16 22:17:43 +09:00
Roland Haeder 296cc69f0a Avoid array_key_exists(), unless we need to check NULL values (#35)
```php
<?php
$array = array(
	'str'  => 'foo',
	'num'  => 12345,
	'null' => NULL,
);

print intval(isset($array['null'])) . PHP_EOL;
print intval(array_key_exists($array['null'])) . PHP_EOL;
print intval(isset($array['num'])) . PHP_EOL;
print intval(array_key_exists($array['num'])) . PHP_EOL;
print intval(isset($array['str'])) . PHP_EOL;
print intval(array_key_exists($array['str'])) . PHP_EOL;
```

Only for this special case, you need array_key_exists(), else avoid it as it is
painfully slow and hurts your performance.

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-10-26 20:01:11 +09:00
Adrien Crivelli fb1d280e82
Remove all references to "hack" from the source code
Remove the term "hack" from the source code to prevent it
from being flagged by malware scanners and audit tools (such as
the very popular myJoomla.com for Joomla sites)
2016-10-24 20:24:56 +09:00
Phil Taylor ec9e548153
Remove the term "hacked by" from the source code
Remove the term "hacked by" from the source code to prevent it
from being flagged by malware scanners and audit tools (such as
the very popular myJoomla.com for Joomla sites)
2016-10-24 19:50:13 +09:00
Adrien Crivelli 02e233634a
All constants are uppercase #25 2016-10-07 09:52:04 +09:00
Max d84d9ba730 Fix spelling and constant name used as default argument (#25) 2016-10-07 08:16:13 +09:00
Adrien Crivelli e2e982f98a
Rename OOCalc and OpenDocument into Ods
FIX #6
2016-10-06 21:07:57 +09:00
Adrien Crivelli 4337de4930
Rename Excel5 into Xls
FIX #4
2016-10-06 20:49:41 +09:00
Adrien Crivelli 39b55ded30
Rename Excel2007 into Xlsx
FIX #5
2016-10-06 20:39:10 +09:00
Adrien Crivelli 2b41bdbf4e
Loosen type checking to allow both use-cases
Previously it crashed when loading an file containing conditional formatting

FIX #21
2016-10-05 14:06:39 +09:00
CrazyBite c94539c86c
Fix reading print area with sheet name containing a comma 2016-10-03 17:18:38 +09:00
Balint Kovacs c99ec67d68
Fix hyperlink reading in ODS files 2016-10-03 07:21:28 +09:00
Adrien Crivelli e95a267034
Apostrophes in sheet names prevented save
If a sheet name included an apostrophe and the sheet had print area
defined then the spreadsheet could not be saved because the cell
coordinates were mangled, eg:
'Fiche d''action'!$A$1:$N$19

wrongly became:
'Fiche d'$A$1:$N$19
2016-10-02 20:21:13 +09:00
Enyby d791a0bbeb
Fix signature detection on Excel2003XML
Signature can be with single quotes:
```
<?xml version='1.0'?>
<?mso-application progid='Excel.Sheet'?>
```
2016-10-02 17:44:17 +09:00
Enyby 102c19356f
Fix bug with convert int
Some bugged file have $data less from four bytes. This fix append zero bytes if it happens.

It is prevent errors on access to need indexes.
2016-10-02 17:40:26 +09:00
Сергей Симонян 5a3e2435c3
Fix undefined index exception in readRow() 2016-10-02 17:24:59 +09:00
Adrien Crivelli ae1b85f961
Fix code style 2016-10-02 15:21:52 +09:00
Adrien Crivelli 8c4c11346b
Fix unit tests for DATEDIF()
Leap years where not properly taken into consideration
2016-10-02 14:46:11 +09:00
Adrien Crivelli 8061f7516e
Rename SECONDOFMINUTE into SECOND for consistency 2016-10-02 09:43:13 +09:00
Adrien Crivelli 75c34f2694
Rename MINUTEOFHOUR into MINUTE for consistency 2016-10-02 09:41:20 +09:00
Adrien Crivelli 382d15a5c3
Rename DAYOFWEEK into WEEKDAY for consistency 2016-10-02 09:35:50 +09:00
Adrien Crivelli 9629151e45
Rename WEEKOFYEAR into WEEKNUM for consistency 2016-10-01 22:44:33 +09:00
Adrien Crivelli 23fbc845dd
Fix unit tests for WEEKNUM() 2016-10-01 22:33:12 +09:00
Сергей Симонян 1a2a6816fb
Fix undefined index exceprtion in readRow()
It's possible undefined index exception in $this->mapCellXfIndex.
2016-09-09 00:42:24 +09:00
Marcus Bointon 39ea4eea98 Don't truncate to 64k in mb_str_replace 2016-09-05 23:23:49 +02:00
MarkBaker fb2edfdacf Merge branch 'develop' of https://github.com/PHPOffice/PhpSpreadsheet into develop
# Conflicts:
#	src/Autoloader.php
2016-08-31 21:58:08 +01:00
MarkBaker fae27a6d63 As iconv is now enabled by default in PHP, make it a requirement, and modify strig functions to use it where appropriate 2016-08-31 21:52:42 +01:00
Adrien Crivelli 47cde0dadc
Introduce vendor prefix `PhpOffice` to namespace 2016-09-01 02:20:47 +09:00
Adrien Crivelli 2922a13764
Reorganize code samples
This introduce a helper class that should be used to log things,
avoiding a lot of boilerplate code.

Also all output are made in /tmp folder instead of beside the script
itself. This is because there is a high chance that the folder containing
the script is not writtable by webserver. So using the /tmp folder
makes it more likely to works in a variety of setup.
2016-09-01 01:17:13 +09:00
Adrien Crivelli c3bb4245b3
Register autoload as the first in the list
Yii framework v1.1 has it's own autoloader and its autoloader throws
an error, when it can't find class. When this library initializes, it
register its own autoloader, but places it at the end of autoload
queue. So when I use library with Yii 1.1, I just face an error:
`include(PHPExcel_Shared_String.php): failed to open stream: No such file or directory`
because Yii's autoloader runs first and tries to include class file
directly.

Registering our autoloader first avoid this.
2016-08-30 00:51:51 +09:00
Nikolay Ivanov 98e00e8843
iconv illegal character fix 2016-08-26 22:52:47 +09:00
Adrien Crivelli 67d5263004
Fix code style 2016-08-26 22:48:57 +09:00
Synchro c50814ac4e
Remove unused local var, function returns void anyway 2016-08-26 22:44:55 +09:00
Synchro 30e0451bc3
Fix duplicate array keys in ptg indices
Reference: http://read.pudn.com/downloads173/sourcecode/delphi_control/805790/DevExpress/DevExpressComm/cxExcelConst.pas__.htm
2016-08-26 22:41:14 +09:00
Synchro 16a8162a14
Fix duplicate array key 2016-08-26 22:32:55 +09:00
Carlos Montiers 6acd403251
In memory gzip cache method use max compression 2016-08-26 22:09:46 +09:00
Carlos Montiers d8850176a1
php://temp maxmemory must be expressed in bytes 2016-08-26 22:07:49 +09:00