Skip to content

Conversation

fabianskier
Copy link

Summary

Add support for automatic parsing of Excel cells with General number format into numeric values (e.g., "1E-3" becomes 0.001). This is controlled via the new parse_general_as_number option in Creek::Book.

Key changes

  • Introduced parse_general_as_number option to Creek::Book and Sheet.
  • Updated the value converter to detect and convert numeric strings in exponential or decimal form using BigDecimal.
  • Preserved backward compatibility: parsing only occurs if the flag is explicitly enabled.
  • Added test coverage with sample files containing large numbers and scientific notation.

Motivation

Without this change, numeric values formatted as General are returned as raw strings, which can lead to incorrect parsing or extra manual conversion. This feature improves developer ergonomics and data consistency.

Related issue

Fixes #96

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.

decimal records are not processed correctly
1 participant