Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ExcelParser ignoring the requested Culture (BREAKING CHANGE) #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheObliterator
Copy link

@TheObliterator TheObliterator commented Sep 17, 2023

Note: This fix may cause breaking behaviours as previously the culture conversion was ignored. ExcelParser defaulted to an InvariantCulture in the constructor but actually defaulted to the user's CurrentCulture during parsing. If a specific culture was specified during construction or in the CsvConfiguration, this was also ignored during parsing.

Cause: XLCellValue.ToString() defaults to the user's current culture unless a specific culture is supplied as an optional parameter. This fix passes the Configuration.CultureInfo to the XLCellValue.ToString() to ensure the requested culture is used.


This change is Reviewable

Note: This fix may cause breaking behaviours as previously the culture conversion was ignored.
ExcelParser defaulted to an InvariantCulture in the constructor but actually defaulted to the user's CurrentCulture during parsing.
If a specific culture was specified during construction or in the CsvConfiguration, this was also ignored during parsing.

Cause: XLCellValue.ToString() defaults to the user's current culture unless a specific culture is supplied as an optional parameter.
This fix passes the Configuration.CultureInfo to the XLCellValue.ToString() to ensure the requested culture is used.
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.

1 participant