Skip to content

Allow Use of Multiple Ranges When Setting Style#4910

Open
oleibman wants to merge 1 commit into
PHPOffice:masterfrom
oleibman:issue411
Open

Allow Use of Multiple Ranges When Setting Style#4910
oleibman wants to merge 1 commit into
PHPOffice:masterfrom
oleibman:issue411

Conversation

@oleibman

Copy link
Copy Markdown
Collaborator

Fix #411, which went stale in 2018 and is now reopened. You can get a style for a set of cells which uses multiple ranges, e.g. A1:B2,C5:H10, but we throw an exception if you try to change the style. I don't know how useful that is, but it's been requested and it's pretty easy to implement with recursion.

The comma in the ranges represents the union operator. getStyle is very permissive - it will allow almost anything to be specified. However, attempts to use a space as the intersection operator, or, indeed, many other nonsense strings, will still be permitted for getStyle but will continue to throw an Exception if an attempt is made to alter the style.

This is:

  • a bugfix
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Fix PHPOffice#411, which went stale in 2018 and is now reopened. You can get a style for a set of cells which uses multiple ranges, e.g. `A1:B2,C5:H10`, but we throw an exception if you try to change the style. I don't know how useful that is, but it's been requested and it's pretty easy to implement with recursion.

The comma in the ranges represents the `union` operator. `getStyle` is very permissive - it will allow almost anything to be specified. However, attempts to use a space as the `intersection` operator, or, indeed, many other nonsense strings, will still be permitted for `getStyle` but will continue to throw an Exception if an attempt is made to alter the style.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Applying styles to multiple ranges with applyFromArray() throws Exception

1 participant