Patches from poi 3.17#1557
Merged
Merged
Conversation
…T classes directly
…n't evaluate data table formulas.
There was a problem hiding this comment.
Pull Request Overview
This PR applies patches from POI 3.17 to enable previously ignored tests, improve table header formatting for numeric and date values, and prevent data table master cells from being treated as formulas.
- Replaced
SetCellReferences(...)calls with a newCellReferencesproperty and added comprehensive unit tests for typed and numeric table headers. - Removed legacy bug-58325 shape tests, updated table creation to set the CT_Table id, and enhanced XSSFTable to support dynamic column addition.
- Excluded data table formula types from formula detection in cells and refined drawing parsing to include all anchor types.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testcases/ooxml/XSSF/UserModel/TestXSSFTable.cs | Switched to CellReferences property, added TestDifferentHeaderTypes and TestNumericCellsInTable tests |
| testcases/ooxml/XSSF/UserModel/TestUnfixedBugs.cs | Removed obsolete test58325_* methods |
| ooxml/XSSF/UserModel/XSSFTable.cs | Added AddColumn, CellReferences property, and enriched UpdateHeaders to use DataFormatter |
| ooxml/XSSF/UserModel/XSSFSheet.cs | Set the internal CT_Table id when creating a table |
| ooxml/XSSF/UserModel/XSSFCell.cs | Updated IsFormulaCell to ignore dataTable formulas |
| OpenXmlFormats/Spreadsheet/Sheet/CT_Table.cs | Added GetTableColumnArray and AddNewTableColumn support |
| OpenXmlFormats/Drawing/SpreadsheetDrawing.cs | Refined XPath in Parse to include all anchor types (oneCellAnchor, twoCellAnchor, absCellAnchor) |
Comments suppressed due to low confidence (1)
ooxml/XSSF/UserModel/XSSFTable.cs:245
- [nitpick] The method name AddColumn may be confusing alongside CreateColumn. Consider renaming it (e.g., InsertColumn) or updating documentation to clarify its purpose and return value.
public void AddColumn()
Collaborator
Author
|
Fix according to Copilot reviews. |
tonyqus
reviewed
May 24, 2025
| ClassicAssert.AreEqual("34.56", t.GetCTTable().tableColumns.GetTableColumnArray(1).name); | ||
| ClassicAssert.AreEqual("ABCD", t.GetCTTable().tableColumns.GetTableColumnArray(2).name); | ||
| // Done | ||
| wb.Close(); |
Member
There was a problem hiding this comment.
You can apply using to IWorkbook object. No need to close it by yourself
Member
|
LGTM |
This was referenced Jul 30, 2025
This was referenced Dec 2, 2025
This was referenced Apr 2, 2026
This was referenced May 20, 2026
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.
Main changes: