Commit Graph

400 Commits

Author SHA1 Message Date
MarkBaker 45ca934a53 Update Change Log and Documentation 2022-03-02 12:33:20 +01:00
MarkBaker f3d5028518 Work on setting up locale-aware formatted number conversion for the Csv Reader
Unit tests for locale-aware boolean conversion for Csv Reader
2022-03-02 08:53:29 +01:00
MarkBaker b31d42c52f Some Refactoring of the Ods Reader, moving all formula and address translation from Ods to Excel into a separate class to eliminate code duplication 2022-02-27 13:31:24 +01:00
MarkBaker 138638ad57 Ensure that selected worksheet is correctly set from Gnumeric Reader 2022-02-26 16:00:28 +01:00
MarkBaker 2af0b66f5f Read number formatting for Gnumeric... highlighted as not occurring when reading date values 2022-02-26 15:20:00 +01:00
Thorsten Ho 0cb60a5098
Fix XLSX broken vertical align font style (#2619)
* Fix XLSX broken vertical align font style

* Add fix information to changelog

* Fix phpcs issues
2022-02-23 20:23:59 -08:00
Mark Baker db21d043fe
Implementation of the ISREF() information function (#2613) 2022-02-21 18:47:23 +01:00
Mark Baker d5dc58d20e
Extract information functions (#2605)
* Split Information functions into a dedicated class and namespace and categorise as Value or Error
* Refactor all error functions into the new ExcelError class
2022-02-19 13:53:17 +01:00
Adrien Crivelli 3c0004760d
Prepare changelog for next version 2022-02-18 14:01:46 +01:00
Adrien Crivelli 3a9e29b4f3
1.22.0 2022-02-18 13:57:07 +01:00
oleibman c9d1df8554
Update Changelog (#2587)
Catch up with some earlier changes.
2022-02-13 00:45:27 -08:00
Mark Baker de2fb1f438
Reset phpstan to level 8... there's too many issues working with mixed and needing to cast to a specific type like string; but the alternative for maintaining exact types is a unnecessar extra of code for explicit handling of casting with checks that we don't need when we know datatypes from manual viewing of the codebase (#2585) 2022-02-12 22:04:02 +01:00
Mark Baker 5d88c6b534
Merge branch 'master' into Issue-2551_Enable-Array-Readiness-for-Functions-Maths 2022-02-12 17:11:45 +01:00
MarkBaker 75213f5ee1 Enable array-readiness for more Math/Trig functions 2022-02-12 16:56:06 +01:00
Orkhan Ahmadov 0eeba6dc0c
`ReferenceHelper@insertNewBefore` checks for missing coordinates before replacing values (#2541)
* ReferenceHelper@insertNewBefore now changes for missing columns before replacing and deleting columns

* Changelog updated

* Fixed code style

* Added assertion for all cells. Change bugfix implementation to use `createNewCell` on Worksheet

* Additional assertions
2022-02-12 07:08:11 -08:00
MarkBaker f577dde178 Fix for DOLLARDE() and DOLLARFR() with negative dollar values
Additional argument validations
2022-02-11 13:19:44 +01:00
Mark Baker 291ea88a6c
Initial work enabling Excel function implementations for handling arrays as arguments when used in "array formulae". (#2562)
* Initial work enabling Excel function implementations for handling arrays as aguments when used in "array formulae".

So far:
 - handling for single argument functions
 - for functions where only one of the arguments is an array (a matrix or a row/column vector)
 - for when there are two array arguments, and one is a row vector, the other a column vector
 - for when there are either 2 row vectors, or 2 column vectors
 - for a matrix and either a row or column vector 

Will work ok, as long as there are no more than two array arguments; still need to identify the logic to apply when there are more than two arrays; or there are two that aren't an already supported row vector/column vector pairing (ie two matrices).

* Throw an exception if we have three or more array arguments (after flattening) passed to a supported function until we can identify the abstruse non-euclidian logic behind how Excel handles building, using and presenting those n-dimensional result arrays

* Implement array arguments for the DATE() function so that we can verify that paired arrays/vectors work with functions that support more than 2 arguments

* Implement array arguments for the many of the Math/Trig functions

* Update change log
2022-02-09 15:12:54 +01:00
Sebastian Nohn 0ff0187f1f
fix most recent changes to the changelog: (#2561)
- fix indentation
- add links to PRs
- put latest changes to the bottom of each section
2022-02-07 09:17:29 -08:00
Sebastian Nohn 454c01be51
Add support for one digit decimals (FORMAT_NUMBER_0, FORMAT_PERCENTAGE_0) (#2525)
* Add support for one digit decimals (FORMAT_NUMBER_0)

* Add support for one digit decimals (FORMAT_NUMBER_0, FORMAT_PERCENTAGE_0)

* adding tests for one digit numbers

* cleanup

* add failing test to block merge of this PR until #2555 has been merged

* fix code style

* fix test
2022-02-05 12:46:50 -08:00
Sebastian Nohn b5c03fc61f
Fix error in PercentageFormatter rounding (#2555)
* fix error in rounding percentages

* add tests for FORMAT_PERCENTAGE

* fix code style
2022-02-05 12:19:05 -08:00
Mark Baker 394b504050
Additional russian function translations (#2554)
* Additional Russian translations for Excel functions

* Update change log
2022-02-04 18:18:21 +01:00
Mark Baker 4d82df2bc6
Add unit test for erroneous translations from Russian to English, and a quick/dirty fix (#2534)
* Add unit test for erroneous translations from Russian to English, and a quick/dirty fix
* Additional translation unit tests with accented characters from Spanish, Bulgarian, Czech and Turkish
* Update Change Log
2022-02-04 16:22:22 +01:00
Mark Baker ebeed87db5
Initial implementation of the MS Excel RANDARRAY() MathTrig function (#2540)
* Initial implementation of the MS Excel RANDARRAY() MathTrig function
Update Change Log

* Unit Tests for RANDARRAY()
2022-01-31 22:29:03 +01:00
Mark Baker 26079174a0
Implementation of the SEQUENCE() Excel365 function (#2536)
* Implementation of the SEQUENCE() Excel365 function

Note that the Calculation Engine does not yet support the Spill operator, or spilling functions

* Handle the use-case of step = 0; and tests for exception handling for invalid arguments

* Update Change Log
2022-01-29 14:32:40 +01:00
oleibman aa29947e0d
Update Change Log (#2522)
Document a number of PRs merged since V21.
2022-01-23 14:55:59 -08:00
Mark Baker 4a04499bff
Read conditional styling for cell (#2491)
* Allow single-cell checks on conditional styles, even when the style is configured for a range of cells
* Work on the CellMatcher logic to evaluate Conditionals for a cell based on its value, and identify which conditional styles should be applied
* Refactor style merging and cell matching for conditional formatting into separate classes; this should make it easier to test, and easier to extend for other CF expressions subsequently
* Added support for containsErrors and notContainsErrors
* Initial work on a wizard to help simplify created Conditional Formatting rules, to ensure that the correct expressions are set
* Further work on extending the Conditional Formatting rules to cover more of the options that are available in MS Excel
* Prevent phpcs-fixer from removing class @method annotations, used to identify the signature for magic methods used in Wizard classes
* Implement `fromConditional()`` method to allow the creation of a CF Wizard from an existing Conditional
* Ensure that xlsx Reader picks up the timePeriod attribute for DatesOccurring CF Rules
* Allow Duplicates/Uniques CF Rules to be recognised in the Xlsx Reader
* Basic Xlsx reading of CF Rules/Styles from <extLst><ext><ConditinalFormattings> element, and not just the <ConditinalFormatting> element of the worksheet

* Add some validation for operands passed to the CF Wizards
 - remove any leading ``=` from formulae, because they'll be embedded into other formulae
 - unwrap any string literals from quotes, because that's also handled internally

Handle cross-worksheet cell references in cellReferences and Formulae/Expressions

* re-baseline phpstan

* Update Change Log with details of the CF Improvements
2022-01-22 19:18:26 +01:00
MarkBaker dee098b3d2 Prepare Change Log for next release 2022-01-22 18:39:14 +01:00
Adrien Crivelli 1a359d2ccb
1.21.0 2022-01-06 12:10:08 +01:00
oleibman 707b7d584e
Update Change Log (#2453)
I noticed, too late, that PR #2422 updated the Release 1.20 section of change log because there was no Unreleased section. Created the missing section, moved the comment for 2422, and added the rest of the changes that have taken place since 1.20.
2021-12-18 11:48:27 -08:00
leo-bsv a7f687fe5c
Xlsx image background in comments #1547 (#2422)
* XLSX Image background in comments

* XLSX-Image-Background-In-Comments (#1547)

* Test fixes, convertion for comment sizes from px to pt, fix for setting image sizes from zip, set image type

* Merge remote-tracking branch 'origin/XLSX-Image-Background-In-Comments' into XLSX-Image-Background-In-Comments

* Tests to check reloaded document.

Co-authored-by: Burkov Sergey
2021-12-17 06:10:59 -08:00
Adrien Crivelli 44436f270b
1.20.0 2021-11-24 00:23:42 +09:00
Vladislav Lyshenko 9dcfd9a5c2
Use standard temporary file for internal use of HTMLPurifier (#2383) 2021-11-23 23:45:43 +09:00
Adrien Crivelli 858e073063 Drop PHP 7.2
This is according to our formal, published, policy to only support
eol PHP after 6 months.

See https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support
2021-11-01 12:01:54 +09:00
Adrien Crivelli 5ca5e3423d
Prepare changelog for next version 2021-11-01 10:59:01 +09:00
Adrien Crivelli a9ab55bfae
1.19.0 2021-11-01 00:09:20 +09:00
Adrien Crivelli 61e989aba5
Keep changelog entries on a single line 2021-11-01 00:04:32 +09:00
Adrien Crivelli 69f633420b
Merge branch 'master' into PHP8-Sane-Property-Names 2021-10-31 15:25:01 +09:00
Einar 7635b3f91a
Optimize applyFromArray by caching existing styles (#1785)
Prevent calling clone and getHashCode when not needed
because these calls are very expensive.

When applying styles to a range of cells can we cache the
styles we encounter along the way so we don't need to look
them up with getHashCode later.
2021-10-31 00:55:00 +09:00
Richard van Velzen 5b4b12f77b
Skip inner loops for empty/default read filter (#2223)
The optimization from #773 was not copied along in #1033, so restore it

Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
2021-10-31 00:09:02 +09:00
oleibman e67f858c95
Update Change Log (#2359)
Preparatory to new release expected soon.
2021-10-30 09:04:32 +09:00
ayacoo 1f08f160ad
[FEATURE] Ability to stream to an Amazon S3 bucket (#2326)
Related #2249
2021-10-16 09:11:03 -07:00
oleibman 90b9decb8e
Xlsx Reader Better Namespace Handling Phase 1 Second Bugfix (#2303)
* Xlsx Reader Better Namespace Handling Phase 1 Second Bugfix

See issue #2301. The main problem in that issue had been introduced with 18.0 and had already ben fixed in master. However there was a subsequent problem that had been introduced in master, an undotted i uncrossed t with namespace handling. When using namespaces, need to call attributes() to access the attributes before trying to access them directly. Failure to do so in parseRichText caused fonts declared in Rich Text elements to be ignored.

* Add An Assertion

Addresses problem in 2301 that had already been fixed.
2021-09-27 16:59:45 -07:00
oleibman f50c287109
Update Changelog (#2302)
Add changes which have been merged since 18.0 release but have not yet been documented in change log.
2021-09-19 18:33:10 -07:00
Alayn Gortazar d0076343c4
Fix Reading XLSX files without styles.xml throws an exception. (#2247)
* Fix Reading XLSX files without styles.xml throws an exception.

* Bugfix, debugging code removed

* Fix Reading XLSX files without styles.xml throws an exception (rethinked)

* Fix Reading XLSX files without styles.xml throws an exception (rethinked)

* Style fixes

* Fix Spreadsheet loaded without styles cannot be written

* Replaced test files for empty styles.xml testing
2021-08-16 05:05:32 -07:00
James Lucas 92909d52f9 Update Changelog to reference Issue and PR 2021-07-21 05:53:49 -07:00
jarrett jordaan 795992835f
When image source is a URL, store the URL for use during extraction. (#2072)
When image source is a link store the link.
Add url mutator.

Update section in documentation on image extraction.
2021-06-24 10:50:44 +02:00
MarkBaker 16d0075640 Change log updates 2021-06-17 16:35:17 +02:00
MarkBaker 66cd68daea Update Change log 2021-06-13 22:41:10 +02:00
Mark Baker 05466e99ce
Html import dimension conversions (#2152)
Allows basic column width conversion when importing from Html that includes UoM... while not overly-sophisticated in converting units to MS Excel's column width units, it should allow import without errors

Also provides a general conversion helper class, and allows column width getters/setters to specify a UoM for easier usage
2021-06-11 17:29:49 +02:00
Mark Baker 19724e3217
Reader writer flags (#2136)
* Use of passing flags with Readers to identify whether speacial features such as loading charts should be enabled; no need to instantiate a reader and manually enable it before loading any more.

This is in preparation for supporting new "boolean" Reaer/Writer features, such as pivot tables

* Use of passing flags with Writers to identify whether speacial features such as loading charts should be enabled; no need to instantiate a writer and manually enable it before loading any more.

* Update documentation with details of changes to the StringValueBinder
2021-06-04 13:45:32 +02:00