Commit Graph

2150 Commits

Author SHA1 Message Date
Adrien Crivelli 57404f4374
1.4.1 2018-09-30 12:57:24 +09:00
Roland Eigelsreiter 9022c39dd8 fixes for continue inside switch statement (#660)
This a bugfix for php 7.3 related errors where using continue inside a switch raises a PHP warning. Either use continue 2 or break. Previously continue behaves like break but the intended usage is to continue the for loop instead.
2018-09-30 01:11:24 +09:00
Derek Bonner 01501b6ff2 Remove locale from format string to prevent formatting error (#644)
When a formatting string has a locale in it an error can occur when outputting. For example when the format string with a locale such as `[$-1010409]#,##0.00;-#,##0.00` appears, a value of 9.98 comes back as $9.98. This is because at https://github.com/PHPOffice/PhpSpreadsheet/blob/1.4.0/src/PhpSpreadsheet/Style/NumberFormat.php#L711 the numberFormat regex will match to the zeros inside the locale ([$-1010409]). Attempts to adjust the numberFormat regex caused regressions in other tests. Adding another step to filter out the locale caused no regression.
2018-09-28 21:28:40 +09:00
jalgaba 9fa8a02fe3 Fix broken sample links on windows due to $baseDir having backslash (#653) 2018-09-28 21:25:50 +09:00
Phil Taylor a98d885830 Typo (#652)
environnement = environment
2018-09-28 20:57:30 +09:00
AegirLeet bebfb1e41a Fix warning when reading xlsx without styles
Fixes https://github.com/PHPOffice/PHPExcel/issues/1134
Fixes #631
2018-08-19 15:43:54 +09:00
Davis Devasia 62f4b7c8cf Change the tcpdf composer suggestion (#628)
The previous address tecnick.com/tcpdf shows a warning that it is abandoned.
The correct address tencickcom/tcpdf
2018-08-19 15:22:21 +09:00
Dalibor Karlović 5e090d1af0
Allow iterators to go out of bounds with prev()
Iterators prev() behavior is now consistent with next(), meaning
that it can go out of bounds and it must be validated with valid()
before using it.

Fixes #587
Fixes #627
2018-08-19 14:02:17 +09:00
Adrien Crivelli 125f462a71
1.4.0 2018-08-06 11:58:06 +09:00
Adrien Crivelli b0004cdabf
Upgrade to latest PHP_CodeSniffer 2018-08-06 11:02:16 +09:00
Julian Kern c04b92198e
Column dimensions are read by Reader\Xlsx
Fixes #596
Fixes #616
2018-08-06 10:33:27 +09:00
Adrien Crivelli 98c55b0f88
Migrator only replaced "PHPExcel" 2018-08-05 23:03:04 +09:00
Daniel 46eabbad60
Rowspans/colspans were incorrect when adding worksheet using loadIntoExisting
Rowspans/colspans are now respected for each HTML document added to an existing
spreadsheet as a new worksheet. The protected $rowspan class property should
be emptied on each call to `loadIntoExisting`.

Fixes #619
Fixes #620
2018-08-05 13:41:06 +09:00
Andrew Siegman adf95bcc0e
Migration tool keep variables containing $PHPExcel untouched
Fixes #598
Fixes #609
2018-08-05 13:27:55 +09:00
Walter Nasich 048947e390
Avoid memory exhaustion when cloning worksheet with a drawing
When cloning `BaseDrawing`, its worksheet will be set as null and thus be
orphaned. But when cloning the worksheet, it will re-assign itself as the
new worksheet for the BaseDrawing.

That way we avoid recursive cloning of a Worksheet that would clone a
BaseDrawing that would clone a Worksheet etc.

Fixes #437
Fixes #613
2018-08-05 13:21:01 +09:00
Mark Baker 1b96c95a44
Add new Complex Number Functions introduced in MS Excel 2013 (#601)
* - Refactored Complex Engineering Functions to use external complex number library
- Added calculation engine support for the new complex number functions that were added in MS Excel 2013
    - IMCOSH()  Returns the hyperbolic cosine of a complex number
    - IMCOT()   Returns the cotangent of a complex number
    - IMCSC()   Returns the cosecant of a complex number
    - IMCSCH()  Returns the hyperbolic cosecant of a complex number
    - IMSEC()   Returns the secant of a complex number
    - IMSECH()  Returns the hyperbolic secant of a complex number
    - IMSINH()  Returns the hyperbolic sine of a complex number
    - IMTAN()   Returns the tangent of a complex number
* Simplified the parseComplex() method in the PhpOffice\PhpSpreadsheet\Calculation\Engineering class, using Complex\Complex; and docblock flagged as deprecated
2018-07-25 14:38:44 +01:00
Adrien Crivelli 57a0297011
HTML entities should not be escaped in Markdown 2018-07-24 10:13:58 +09:00
Mark Baker 67cdee6033
Add new Bitwise Functions introduced in MS Excel 2013 (#603)
* - Added calculation engine support for the new bitwise functions that were added in MS Excel 2013
  - BITAND()     Returns a Bitwise 'And' of two numbers
  - BITOR()      Returns a Bitwise 'Or' of two number
  - BITXOR()     Returns a Bitwise 'Exclusive Or' of two numbers
  - BITLSHIFT()  Returns a number shifted left by a specified number of bits
  - BITRSHIFT()  Returns a number shifted right by a specified number of bits
2018-07-22 22:16:34 +01:00
Mark Baker 9b44cf3418
Add further new Functions introduced in MS Excel 2013 and 2016 (#608)
- Fix ISFORMULA() function to work with a cell reference to another worksheet
 - Added calculation engine support for the new functions that were added in MS Excel 2013 and MS Excel 2016
   - Text Functions
     - CONCAT()     Synonym for CONCATENATE()
     - NUMBERVALUE()  Converts text to a number, in a locale-independent way
     - UNICHAR()    Synonym for CHAR() in PHPSpreadsheet, which has always used UTF-8 internally
     - UNIORD()     Synonym for ORD() in PHPSpreadsheet, which has always used UTF-8 internally
     - TEXTJOIN()   Joins together two or more text strings, separated by a delimiter
   - Logical Functions
     - XOR()        Returns a logical Exclusive Or of all arguments
   - Date/Time Functions
     - ISOWEEKNUM()  Returns the ISO 8601 week number of the year for a given date
   - Lookup and Reference Functions
     - FORMULATEXT()  Returns a formula as a string
   - Engineering Functions
     - ERF.PRECISE()   Returns the error function integrated between 0 and a supplied limit
     - ERFC.PRECISE()  Synonym for ERFC
   - Math and Trig Functions
     - SEC()          Returns the secant of an angle
     - SECH()         Returns the hyperbolic secant of an angle
     - CSC()          Returns the cosecant of an angle
     - CSCH()         Returns the hyperbolic cosecant of an angle
     - COT()          Returns the cotangent of an angle
     - COTH()         Returns the hyperbolic cotangent of an angle
     - ACOT()         Returns the cotangent of an angle
     - ACOTH()        Returns the hyperbolic cotangent of an angle
  - Financial Functions
    - PDURATION()    Calculates the number of periods required for an investment to reach a specified value
    - RRI()          Calculates the interest rate required for an investment to grow to a specified future value
2018-07-22 19:17:04 +01:00
Adrien Crivelli 3028c60656
Remove unnecessary docs 2018-07-15 13:23:46 +09:00
Adrien Crivelli 863fb86925
Remove file header 2018-07-15 13:23:23 +09:00
yuzhakov 17d4a54666
Read and write hyperlink for drawing image
Fixes #490
2018-07-15 13:00:30 +09:00
Einar Lielmanis b05d07a365 Chained operations on cell ranges involving borders are now possible
Fixes #428
Fixes #578
2018-07-15 12:19:54 +09:00
Rolands Usāns eb31899225 Function EXACT(arg1, arg2) support (#595) 2018-07-15 11:56:25 +09:00
Andrew Siegman 043327bb7d
Exclude the vendor folder in migration
Fixes #481
Fixes #586
2018-07-08 13:35:40 +09:00
Vladimir Reznichenko e0ed25d6b2 Php Inspections (EA Extended): minor code tweaks (#579) 2018-07-04 23:55:33 +09:00
Adrien Crivelli 9fdcaabe3c
Could not open CSV file containing HTML fragment
We now always trust the file extension to avoid false positive of mime
detection for most simple cases. But we still try to guess the mime type
if the file extension does not match or is missing.

Fixes #564
2018-06-25 11:12:27 +09:00
Bill Blume edb68ce05c
Support workbook view attributes for Xlsx format
Editing a Xlsx document using PhpSpreadsheet should preserve the workbook
view attributes of that document. For example, if the worksheet tabs are
hidden in the original document, they should remain hidden after updating.

Fixes #523
Fixes #525
2018-06-24 20:15:38 +09:00
Derek Bonner 7a4cbd4fd5 Cell formats with escaped spaces were causing incorrect date formatting
Fix issue where escaped spaces in cell format would cause incorrect
date format leading to incorrect time conversions

Fixes #557
Closes #558
2018-06-24 19:35:45 +09:00
Mewes Kochheim a6bb491539
Fixed method call (setRevisionPassword -> setRevisionsPassword)
Fixes #553
2018-06-18 13:47:58 +09:00
Adrien Crivelli aa5b0d0236
1.3.1 2018-06-12 22:40:21 +09:00
Adrien Crivelli 371c800e3f
Ranges across Z and AA columns incorrectly threw an exception
Fixes #545
2018-06-11 22:54:11 +09:00
Adrien Crivelli 2eb342c13d
1.3.0 2018-06-10 15:44:19 +09:00
Bill Blume 4c09d4f668
Properly set selected cells for frozen panes
Properly set the selected cells for worksheets with frozen panes when
writing Xlsx documents. Beforehand, the saved Xlsx documents were
generating corruption warnings when opened in Excel.

Fixes #532
Closes #535
2018-06-10 14:56:53 +09:00
Bill Blume e3fb160f5f
Fixed parsing of conditionals in COUNTIF functions
Conditional operators in the selection parameter of COUNTIF
functions were not being parsed properly, causing evaluations
of formulae with such functions to sometimes fail.

Fixes #526
Closes #528
2018-06-10 14:25:33 +09:00
Robin D'Arcy ed2185417e
Throw exception for invalid range to prevent infinite loop
Fixes #519
Closes #521
2018-06-10 13:34:10 +09:00
Adrien Crivelli 4bc3ee3830
Update Changelog for previous commit 2018-06-10 13:06:57 +09:00
Toni Martí b700614f0d
Make newer Excel versions properly recalculate formulas on document open
Fixes #456
Closes #515
2018-06-10 12:57:25 +09:00
Adrien Crivelli 22d5312be8
Remove extra js in docs
Since the release of Read the Docs 2.5 this is no longer required
and it broke version selector.
2018-06-08 12:15:24 +09:00
Adrien Crivelli 50dc5b8fe2
Mention API doc in the the Getting Started section 2018-06-04 14:23:10 +09:00
Adrien Crivelli ab541b9b5f
Emphasis the point being discussed 2018-06-04 14:09:21 +09:00
Adrien Crivelli c897bdfadf
Publish Sami, not the other docs 2018-06-04 14:04:48 +09:00
Adrien Crivelli 041a7f9ca3
Keep Sami cache across builds 2018-06-04 13:49:07 +09:00
Adrien Crivelli 2bb54ef989
Use PHP 7.1 to generate API 2018-06-04 13:31:18 +09:00
Adrien Crivelli 1afba78f85
Publish API documentation via Travis and Sami
Fixes #491
Fixes #497
2018-06-04 13:18:39 +09:00
werraco df6443feaf Update worksheets.md (#520)
Passing 0 arguments will throw the following error:
"PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function PhpOffice\PhpSpreadsheet\Spreadsheet::getSheet(), 0 passed in {filepath} and exactly 1 expected"
2018-05-31 20:30:04 +09:00
KoenigsKind dcc1832215
In PHP7 required parameters must be set
Closes #486
2018-05-26 14:31:34 +09:00
Dominik b509b672e0
Xlsx reader do not read rows and columns filtered out in readFilter at all
Set rows and columns dimensions for only cells rows and columns
allowed by readfilter

Fixes #370
Closes #421
2018-05-26 13:30:21 +09:00
Dominik 7e9f43bf5b
Fix Xlsx loaded an extra empty comment for each real comment
Fixes #375
Closes #420
2018-05-26 11:19:12 +09:00
Robin D'Arcy c723833d6f Allow CSV escape character to be set
Fixes #492
Closes #510
2018-05-23 10:31:41 +09:00