Skip to content

Issue 694: Fix timespan parsing for invalid iso values#705

Merged
appel1 merged 3 commits into
ExcelDataReader:developfrom
yfa-vagelis:fix/timespan-parsing-from-formula-694
May 4, 2025
Merged

Issue 694: Fix timespan parsing for invalid iso values#705
appel1 merged 3 commits into
ExcelDataReader:developfrom
yfa-vagelis:fix/timespan-parsing-from-formula-694

Conversation

@yfa-vagelis

Copy link
Copy Markdown
Contributor

Issue

In some cases, the cell is formatted as a timespan and the value is generated by a formula, but the result is not a valid timespan. In such situations, XmlConvert.ToTimeSpan will throw a FormatException. It is reasonable to handle these cases by catching the exception.

Solution

Added excpetion handling for FormatException raised by XmlConvert.ToTimeSpan, and moved the related code to a new private method.

@appel1 appel1 merged commit bd217f6 into ExcelDataReader:develop May 4, 2025
@appel1

appel1 commented May 4, 2025

Copy link
Copy Markdown
Collaborator

Seems I'm not very good with the web merge ui. Fixed in a later commit. :|

@yfa-vagelis yfa-vagelis deleted the fix/timespan-parsing-from-formula-694 branch May 4, 2025 17:08
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.

3 participants