Commit Graph

1682 Commits

Author SHA1 Message Date
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 bd9eb19593
Split changelog not to confuse version numbers 2017-04-14 17:38:40 +09:00
Adrien Crivelli 45e8529a7e
Remove mention of bug in SQLite3
Since the refactoring towards PSR-16 it is very unlikely that the bug
still exists.
2017-04-14 17:27:54 +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 2d630fbbb9
Document non-available data validation support 2017-04-12 13:25:37 +09:00
Adrien Crivelli 969baa1122
Document data validation support 2017-04-12 12:59:00 +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
Adrien Crivelli 714dc29890
Document macro support 2017-04-04 19:31:58 +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
Adrien Crivelli b7b10612ab
Re-enable unit tests that should work again now 2017-04-01 14:17:53 +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
Roland Häder 134652a045 updated libraries with `composer update` #124 (#125)
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-29 18:59:07 +09:00
tsmsogn 0f0de914f4 Fix sample which does't work (#123) 2017-03-24 22:09:32 +09:00
Adrien Crivelli 2e24a1e1b4
Fix PDF samples 2017-03-24 19:46:19 +09:00
MarkBaker 08ced34dfd SUBTOTAL options for ignoring hidden cells 2017-03-19 14:17:20 +00:00
Gabriel Machado 4b75f7d469 Fix Quadratic equation solver example (#120) 2017-03-17 00:24:43 +09:00
Adrien Crivelli 8e8d0e4a30
Improve doc formatting with backticks 2017-03-13 14:57:37 +09:00
Adrien Crivelli fec674e797
Typo 2017-03-13 12:33:24 +09:00
Adrien Crivelli b8adec4938
Update documentation with composer instructions
And split first page into several topics to improve sidebar navigation

Closes #114
2017-03-13 12:30:26 +09: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
NilsRenaud de57bf722c
Split sentences for better readability
Closes https://github.com/PHPOffice/PHPExcel/pull/1147
2017-03-12 11:02:43 +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
Adrien Crivelli c5339b7302
Reformat column width section 2017-03-10 19:58:25 +09:00
Adrien Crivelli da9df0ba78
Fix internal link in documentation 2017-03-10 19:58:25 +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 93e2204774
Document ODS supported features
This should be completed in the future.
2017-03-06 14:40:27 +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 219e4e6258 Writer\Ods\Content: Set "CompatibilityMode" before and after running the tests in
order to avoid conflicts with other tests
2017-03-04 17:18:18 +01: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 5620510991 Writer\Ods\Content: basic unit tests 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 85c3bd0154
Fix typo in bug number 2017-03-02 09:40:10 +09: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 13472e8247
Upgrade to PHP-CS-Fixer 2.1 2017-02-25 17:38:45 +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 a0321fd6fd Removed PhpStorm comment on top of file 2017-02-20 21:02:49 +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