You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fesod.apache.org by "leehaut (via GitHub)" <gi...@apache.org> on 2026/10/12 05:38:20 UTC

[PR] Fix#1213 decode XLS RKRecord numeric cells instead of treating them as empty [fesod]

leehaut opened a new pull request, #1214:
URL: https://github.com/apache/fesod/pull/1214

   Fix https://github.com/apache/fesod/issues/1213
   
   ## Summary
   
   - Fix silent data loss when reading BIFF `.xls` cells stored as `RKRecord` on the event-API path.
   - Align `RkRecordHandler` with `NumberRecordHandler`: decode `RKRecord.getRKNumber()`, attach data format, and mark the row as `DATA`.
   - Add a unit regression test that builds a real `RKRecord` from BIFF bytes (modern writers usually emit `NUMBER`, not `RK`, so a usermodel round-trip is not a reliable repro).
   
   
   ## Problem
   
   `RkRecordHandler` previously always stored an `EMPTY` cell and never called `getRKNumber()`. Older BIFF workbooks can still contain RK records; on Fesod’s streaming XLS read path those values were dropped with no exception or warning.
   
   ## Changes
   
   | File | Change |
   |------|--------|
   | `fesod-sheet/.../handlers/RkRecordHandler.java` | Decode RK number as `NUMBER` + data format, same pattern as `NumberRecordHandler` |
   | `fesod-sheet/.../handlers/RkRecordHandlerTest.java` | Regression test: integer RK `42` must read as `NUMBER` / `42` |
   
   ## Test plan
   
   - [x] `mvn -pl fesod-sheet "-Dmaven.test.skip=false" "-Dtest=RkRecordHandlerTest" test`
   - [ ] CI green on this PR
   - [ ] (Optional) Manually verify against a legacy `.xls` that still contains RK records, if available


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org


Re: [PR] Fix#1213 decode XLS RKRecord numeric cells instead of treating them as empty [fesod]

Posted by "leehaut (via GitHub)" <gi...@apache.org>.
leehaut commented on PR #1214:
URL: https://github.com/apache/fesod/pull/1214#issuecomment-6141156650

   @skytin1004  Thanks for reviewing and for verifying the other RK encodings locally!
   
   Good point — I've expanded `RkRecordHandlerTest` with parameterized cases covering:
   
   - positive / negative integers
   - integer + divide-by-100 (`12.34`, `-0.5`)
   - IEEE floating-point (`1.5`) and IEEE + divide-by-100 (`0.055`)
   - an assertion that the data format from `FormatTrackingHSSFListener` is preserved
   
   Pushed in the latest commit. Please take another look when you have a moment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org