Skip to content

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.
@mrhighstone
Copy link

I would love to see this PR accepted. Took me some days to realise this exactly was causing the issue when reading a dutch (with comma as decimal separator) Excel file...

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