Ods Reader Style Support Part 1 - Fonts and Solid Fill#4810
Merged
oleibman merged 6 commits intoPHPOffice:masterfrom Feb 16, 2026
Merged
Ods Reader Style Support Part 1 - Fonts and Solid Fill#4810oleibman merged 6 commits intoPHPOffice:masterfrom
oleibman merged 6 commits intoPHPOffice:masterfrom
Conversation
Fix PHPOffice#2622. Fix PHPOffice#1191 (stale as of 2020 but just reopened). A long overdue addition. Ods Reader has till now not supported any styles (although PR PHPOffice#4806 added some support for number formats). This will be the first of several PRs to rectify this situation. Ods Reader Changes - Default font - Font - autoColor - bold - color - italic - font-family (name) - size - underline - Fill (type=Solid only) - startColor Ods Writer Changes - Default font - Font - strikethrough (fix PHPOffice#4808) - size currently always writes to xml with one decimal point, will now eliminate `.0` Ods Reader changes still to come - Default fill, border, alignment, protection - Font - subscript - superscript - Fill - types other than Solid - Alignment - Borders - Protection Ods Writer changes still to come - Default fill, border, alignment, protections
Sample 20_Read_Ods exposed some problems which are now corrected.
oleibman
added a commit
to oleibman/PhpSpreadsheet
that referenced
this pull request
Feb 18, 2026
Continuing the work of PR PHPOffice#4810. Ods Reader changes still to come - Default border, alignment, protection - Font - subscript - superscript - Borders (up next) - Style applied to entire row - Style applied to entire column - Parent styles? Ods Writer changes still to come - Default border, alignment, protections - Style applied to entire row - Style applied to entire column - Parent styles?
11 tasks
oleibman
added a commit
to oleibman/PhpSpreadsheet
that referenced
this pull request
Feb 20, 2026
Continuing the work of PR PHPOffice#4810 and PR PHPOffice#4813. All "real" borders are implemented. Pseudo-borders (outline, vertical, horizontal, inside, and allBorders) are not because I'm not really sure how, or even if, Ods handles them. However, Sample20_Read_Ods demonstrates a way to emulate `outline` using just the real borders. In template OOCalcTest.ods cells B18:C19 are merged, and the merged cell has multi-colored borders, something which `outline` isn't able to do. Ods Reader handles this by assigning the border style first to cell B18 (which is what Ods wants, and it doesn't hurt Xlsx/Xls) and then to cells B18:C19 (which is what Xlsx and Xls want, and it doesn't hurt Ods). Ods Reader changes still to come - Style applied to entire row - Style applied to entire column - Parent styles? Ods Writer changes still to come - Style applied to entire row - Style applied to entire column - Parent styles? Not currently on my to-do list - Pseudo-borders - Subscript and superscript fonts (these really only make sense for RichText, and I'm not sure how Ods handles RichText) - Default border, alignment, and protection. I'm not convinced there's a use case. Ods handles its defaults in two different manners, and I don't want to spend the time trying to understand it without justification.
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #2622. Fix #1191 (stale as of 2020 but just reopened). A long overdue addition. Ods Reader has till now not supported any styles (although PR #4806 added some support for number formats). This will be the first of several PRs to rectify this situation.
Ods Reader Changes
Ods Writer Changes
.0Ods Reader changes still to come
types other than Solid(seems unsupported in LibreOffice)Ods Writer changes still to come
This is:
Checklist: