Skip to content

Read built-in number format 17 (mmm-yy) as DateTime - #1035

Merged
michelebastione merged 1 commit into
mini-software:v1.x-maintenancefrom
pedrorossato:fix/builtin-format-17-datetime
Oct 30, 2026
Merged

michelebastione merged 1 commit into
mini-software:v1.x-maintenancefrom
pedrorossato:fix/builtin-format-17-datetime

Conversation

@pedrorossato

Copy link
Copy Markdown

Fixes #1034

The built-in number format 17 (mmm-yy) was declared with typeof(TimeSpan). ConvertValueByStyleFormat only handles DateTime? and TimeSpan?, so cells using it were returned as the raw OADate serial. This declares it as typeof(DateTime?), like the other built-in date formats (14, 15, 16 and 22).

  • ExcelOpenXmlStyles: format 17 type TimeSpan → DateTime?.
  • MiniExcelIssueTests.QueryReadsBuiltInDateFormatsAsDateTime: reads the same serial with the built-in date formats 14, 15, 16, 17 and 22 and expects a DateTime; only the 17 case fails without the fix.
  • Helpers.ReplaceStylesXml: test helper mirroring ReplaceFirstSheetXml.

MiniExcelTests passes locally (380/380, net10.0, Windows).

The built-in number format 17 was declared with typeof(TimeSpan). ConvertValueByStyleFormat only handles DateTime? and TimeSpan?, so cells using it were returned as the raw OADate serial. Declare it as typeof(DateTime?), like the other built-in date formats (14, 15, 16 and 22).

Fixes mini-software#1034
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c2753b77-ec05-49f7-9d17-df3dc06803e2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@michelebastione

Copy link
Copy Markdown
Collaborator

Thank you for the contribution @pedrorossato! Could you please open a PR for fixing this on the master branch as well?

@michelebastione
michelebastione merged commit 9557599 into mini-software:v1.x-maintenance Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants