Skip to content

Conversation

@oleibman
Copy link
Collaborator

@oleibman oleibman commented Jul 7, 2024

While researching issue #1551, I came across some minor problems.

When a spreadsheet does not have a title, which is often the case for spreadsheets created with Excel (note that this is not the case for spreadsheets created with PhpSpreadsheet), if you try to save it as Html, it throws an exception. It will now use the sheet title of the active sheet as a title in this case.

When writing an Html spreadsheet using useInlineCss(true), gridlines are not handled properly. This is addressed by adding class=gridlines gridlinesp to the cell's td tag, and by suppressing any border attributes which would be styled as none #000000. It would be unusual to turn off gridlines for specific cells, but that can still be accomplished by using Border::BORDER_NONE in conjunction with any color other than #000000 - see new test testHideSomeGridlines.

This is:

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

Checklist:

Why this change is needed?

Provide an explanation of why this change is needed, with links to any Issues (if appropriate).
If this is a bugfix or a new feature, and there are no existing Issues, then please also create an issue that will make it easier to track progress with this PR.

oleibman added 5 commits July 6, 2024 19:58
While researching issue PHPOffice#1551, I came across some minor problems.

When a spreadsheet does not have a title, which is often the case for spreadsheets created with Excel (note that this is not the case for spreadsheets created with PhpSpreadsheet), if you try to save it as Html, it throws an exception. It will now use the sheet title of the active sheet as a title in this case.

When writing an Html spreadsheet using `useInlineCss(true)`, gridlines are not handled properly. This is addressed by adding `class=gridlines gridlinesp` to the cell's `td` tag, and by suppressing any border attributes which would be styled as `none #000000`. It would be unusual to turn off gridlines for specific cells, but that can still be accomplished by using `Border::BORDER_NONE` in conjunction with any color other than `#000000` - see new test `testHideSomeGridlines`.
@oleibman oleibman enabled auto-merge July 12, 2024 16:29
@oleibman oleibman added this pull request to the merge queue Jul 12, 2024
Merged via the queue into PHPOffice:master with commit 88908a8 Jul 12, 2024
@oleibman oleibman deleted the issue1515minor branch July 12, 2024 20:15
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.

1 participant